Path: utzoo!attcan!uunet!mcvax!cernvax!hjm From: hjm@cernvax.UUCP (Hubert Matthews) Newsgroups: comp.lang.forth Subject: Re: Infix/Postfix notation Keywords: infix, postfix, stacks Message-ID: <816@cernvax.UUCP> Date: 9 Sep 88 11:21:29 GMT References: <2768@pt.cs.cmu.edu> <621@sas.UUCP> Reply-To: hjm@cernvax.UUCP (Hubert Matthews) Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 33 One of the other things about infix notation is that it works for two parameter functions very easily, but three gets a bit tricky (you need another symbol) and four starts to look kinda crazy. For n parameters you need n-1 symbols with infix; with prefix or postfix you need only one. Just try adding another argument to an infix function - it's messy! If you do want infix notation for the if-then-else construct, then why not use Hoare's notation: a <| c |> b where c is the test and a and b are the alternatives; true to the left and false to the right. It's just as well that boolean conditions can have only two values or you would be stuck to extend this notation cleanly. Or would you go to a four-way branch like this: x ^ - a <| c |> b _ v y Five is really tricky with a standard keyboard :-) Hubert Matthews