Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!services.cambridge.apple.com!trib.apple.com!agate!spool.mu.edu!uwm.edu!math.ohio-state.edu!howland.reston.ans.net!EU.net!uunet!wri!jbrewermac.wri.com!jbrewer
From: John Brewer <jbrewer@wri.com>
Subject: Re: Prefix vs. Infix?
Message-ID: <CxMJEn.83p@wri.com>
X-Xxmessage-Id: <AAC2E27DB701C990@jbrewermac.wri.com>
X-Xxdate: Thu, 13 Oct 1994 19:11:25 GMT
Sender: news@wri.com ( )
Nntp-Posting-Host: jbrewermac.wri.com
Organization: Wolfram Research, Inc.
X-Newsreader: Nuntius Version 1.2
References: <37jo4v$7lm@hobbes.cc.uga.edu>
Date: Thu, 13 Oct 1994 18:30:23 GMT
Lines: 26

In article <37jo4v$7lm@hobbes.cc.uga.edu> stone, stone@phoenix.cs.uga.edu
writes:
> Other than the obvious, what's the difference?  Is there any reason I
> should use one vs. the other?  (Does prefix compile faster, etc?)

Lisp people prefer prefix because operator precidence is unambiguous,
because Lisps have traditionally used infix notation, and because it
makes writing the parser substantially easier.  Compare a parser for
Scheme to a parser for C for a glaring example.

Most other computer people prefer infix, because they have been using it
since kindergarten, and because, despite it's ambiguity, it's been the
standard mathematical representation for centuries.

Forth programmers prefer postfix, because it's non-ambiguous, and easy
and efficient to use with a virtual stack machine.

Inside, it's all parse trees anyhow.  Printing out a parse tree in
prefix, infix and postfix notation is a typical homework problem for a
second-year computer science course.  So don't get hung up on syntax. 
Modern languages like Dylan (and Mathematica, if I may make a shameless
plug) let you use prefix or infix, as you prefer.

John Brewer
Wolfram Research, Inc.
(but speaking for myself)
