Path: utzoo!attcan!uunet!jarthur!usc!wuarchive!psuvax1!psuvm!dn5 From: DN5@psuvm.psu.edu Newsgroups: comp.lang.forth Subject: Re: ... and zen there were objects. Message-ID: <90227.092721DN5@psuvm.psu.edu> Date: 15 Aug 90 13:27:21 GMT References: <1990Aug7.081509.2315@idacom.uucp> <1498.UUL1.3#5129@willett.pgh.pa.us> Organization: Penn State University Lines: 42 In article <1498.UUL1.3#5129@willett.pgh.pa.us>, dwp@willett.pgh.pa.us (Doug >What I think is wrong with Object Oriented Extensions to Forth: [Deleted text] >That looks ok, but it does not do anything. In order to do something you >would have to add a special word. I would pick SEND, as in: > 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). The syntax which I came up with when I was experimenting with objects in forth is similar: 10 20 MyRectangle ~ MoveTo Using the Mac keyboard, I had access to all sorts of funky symbols, but I liked the tilda best, because it is obvious, unused, and also on most other keyboards of other systems. 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. Unfortunately, I never got any further than creating the syntax, because somebody offered me actual cash to work on something else. Hopefully in the fall I can go back to work on this, so I can have a better development environment than Pascal or C. :-) :-) ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() D. Jay Newman ! All syllogisms have three parts, dn5@psuvm.psu.edu ! therefore this is not a syllogism. CBEL--Teaching and Learning Technologies Group