Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!dwp From: dwp@willett.pgh.pa.us (Doug Philips) Newsgroups: comp.lang.forth Subject: Re: ... and zen there were objects. Message-ID: <1532.UUL1.3#5129@willett.pgh.pa.us> Date: 16 Aug 90 04:57:04 GMT References: <90227.092721DN5@psuvm.psu.edu> Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 39 In <90227.092721DN5@psuvm.psu.edu>, DN5@psuvm.psu.edu writes: > In article <1498.UUL1.3#5129@willett.pgh.pa.us>, dwp@willett.pgh.pa.us (Doug > > 10 20 MoveTo MyRectangle SEND > > > >the nice thing about having an explicit send is that you can replace > >MoveTo and/or MyRectangle with arbitrary Forth code and still have it > >work. > > My comments: > > I don't like this syntax, because it means that I would have to > do something special if I had a function which returned an object > (i.e., I had an anonymous object on the top of the stack). Now I'm really confused. When I said 'you can replace MyRectangle with arbitrary Forth code' that is precisely what I meant (anonymous objects). I think we agree here despite what we are saying. ;-) > (i.e., I had an anonymous object on the top of the stack). The > syntax which I came up with when I was experimenting with objects > in forth is similar: > > 10 20 MyRectangle ~ MoveTo > > Basically ~ was an immediate word which took the next word as a > string, and hashed it to a method reference, and compiled a call > to the object dereferencer with that as a parameter. In the future > I would replace all calls which could be figured out at compile > time to a direct call to word involved. Whether the message name itself is IMMEDIATE or whether there is a special prefix which is IMMEDIATE, message names are still active and I still object to them. -Doug --- Preferred: ( dwp@willett.pgh.pa.us OR ...!{sei,pitt}!willett!dwp ) Daily: ...!{uunet,nfsun}!willett!dwp [last resort: dwp@vega.fac.cs.cmu.edu]