Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.forth Subject: Re: New Directions: Forth is not postfix Message-ID: <2.71SW6xds13@ficc.uu.net> Date: 21 Jan 90 21:29:19 GMT References: <284.UUL1.3#5129@willett.UUCP> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 48 > One of the things that is an annoying inconsistency is that > Forth is not fully postfix. The words ':', 'IF', 'DO', 'ELSE' > etc. are prefix. Has anyone out there done real postfix forth? Adobe did. It's called Postscript. Oddly enough, I did something like this a while ago, using the same syntax as Postscript. Before I'd ever heard of said language. > IF ELSE THEN might be: > else-addr then-addr condition IF-THEN-ELSE { stuff } { stuff } cond ifelse > IF THEN might be: > then-addr condition IF-THEN { stuff } cond if > One of the benefits to this is that UNLOOP is just a plain exit. Yes. > One of the drawbacks to this is that it highlights Forth's lack of paradigm > for doing controlled exits of more than just the immediately enclosing > construct.... > ... {{ ... EXIT-:-WE-ARE-IN CheckError IF-THEN ... }} 100 0 ITERATE ... (vaguely postscripty forth:) sizeof jumpbuf allocate 'status define { bunch { of { nested { stuff } while { true status longjmp } something if } exec } status setjmp 0= if } 'new_word define (actually throw and catch are better names, but longjmp/setjmp should be more familiar to the large number of C hacks on Usenet) So, do we call this "SIXTH"? -- _--_|\ Peter da Silva. +1 713 274 5180. . / \ \_.--._/ Xenix Support -- it's not just a job, it's an adventure! v "Have you hugged your wolf today?" `-_-'