Re: Using Bison and Delphi

"John R. Strohm" <strohm@airmail.net>
6 Dec 2004 20:58:17 -0500

          From comp.compilers

Related articles
Using Bison and Delphi mikehahn@rogers.com (Mike Hahn) (2004-11-17)
Re: Using Bison and Delphi vbdis@aol.com (2004-11-19)
Re: Using Bison and Delphi mikehahn@rogers.com (Mike Hahn) (2004-11-20)
Re: Using Bison and Delphi vbdis@aol.com (2004-11-26)
Re: Using Bison and Delphi vbdis@aol.com (2004-11-28)
Re: Using Bison and Delphi jeremy.wright@microfocus.com (Jeremy Wright) (2004-11-28)
Re: Using Bison and Delphi mikehahn@rogers.com (Mike Hahn) (2004-12-05)
Re: Using Bison and Delphi strohm@airmail.net (John R. Strohm) (2004-12-06)
Ada use of parens vs brackets arnold@skeeve.com (Aharon Robbins) (2004-12-11)
Re: Ada use of parens vs brackets mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2004-12-13)
Re: Ada use of parens vs brackets nick.roberts@acm.org (Nick Roberts) (2004-12-16)
| List of all articles for this month |

From: "John R. Strohm" <strohm@airmail.net>
Newsgroups: comp.compilers
Date: 6 Dec 2004 20:58:17 -0500
Organization: Compilers Central
References: 04-11-078 04-11-099 04-12-036
Keywords: Fortran, syntax
Posted-Date: 06 Dec 2004 20:58:17 EST

"Mike Hahn" <mikehahn@rogers.com> said:
> I admit that my language might be hard to parse. If an open
> parenthesis followed by an object name is encountered, you don't know
> until reaching the close parenthesis what you're dealing with. One
> possible solution to that problem is using a colon (:) operator for
> method calls and a dollar-sign ($) operator for array references, and
> no operator for variable references.


Why screw up syntax for something that isn't a problem in real life?


FORTRAN has been doing parentheses for arrays and "method" calls since
the late 1950s. Ada has been doing it since 1983 (actually since
before that). LISP has been doing it forever. It ISN'T a problem in
real life.


FORTRAN arguably did it because they didn't know any better. LISP did
it because LISP does parentheses.


Ada, however, did it because they WANTED array references and function
calls to look the same, so that programmers could change between
function-driven code and table-driven code at will, without having to
change the source that called the function or decision table.
[Whether function calls and array references should look the same is
a purely religious issue. You are quite correct that the syntactical
issues are no big deal. And then there's C++ which panders to all
sides and lets you do it either way. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.