Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!decwrl!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.forth Subject: Re: ... and zen there were objects. Message-ID: <11376@medusa.cs.purdue.edu> Date: 15 Aug 90 22:49:10 GMT Organization: Department of Computer Science, Purdue University Lines: 46 In article <1498.UUL1.3#5129@willett.pgh.pa.us> dwp@willett.pgh.pa.us (Doug Philips) writes: >I also dislike the necessity of doing message sends from the "inside >out": > PushArg PushArg Object Message > >I say "inside out" because in traditional OO systems, say SmallTalk, the >syntax is: > Object Message Arg Arg ... > >so the "inside out" syntax is neither "prefix" nor "post fix" but inside out. Well, you asked for feedback. I would say you are being needlessly picky here. Since when has anyone who advocates forth cared what any 'traditional' language looks like. I would say the syntax with the message at the end is really the most forth-like. The function usually comes at the end in forth. The message is basically just an indirect function call. >The SmallTalk syntax works nicely for both nesting and cascading. Since >Forth is post-fix, I think that the syntax should be: > PushArg PushArg Message Object Dissagree. I would call this syntax "inside out". >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 SEND is a good word. But it should only be necessary if there is a message sitting on the stack. ie "normal" generic function call should go like this: PushArg PushArg Object Message But the same thing could be accomplished by: PushArg PushArg Object ' Message SEND Thus you can have messages returned on the stack and you can tell at a glance whether that is in fact what a line of code will do. -- Bill Just ask the Axis He knows everything