C declaration syntax (was Re: detecting ambiguous grammars)

henry@spsystems.net (Henry Spencer)
4 Apr 2001 00:26:58 -0400

          From comp.compilers

Related articles
detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-02-15)
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-26)
Re: detecting ambiguous grammars cfc@world.std.com (Chris F Clark) (2001-03-27)
Re: detecting ambiguous grammars kenarose@earthlink.net (Ken Rose) (2001-03-31)
C declaration syntax (was Re: detecting ambiguous grammars) henry@spsystems.net (2001-04-04)
| List of all articles for this month |

From: henry@spsystems.net (Henry Spencer)
Newsgroups: comp.compilers
Date: 4 Apr 2001 00:26:58 -0400
Organization: SP Systems, Toronto, Canada
References: 01-02-080 01-03-119 01-03-139 01-03-183
Keywords: parse, C, history
Posted-Date: 04 Apr 2001 00:26:57 EDT

Our moderator wrote:
>[...The idea of C declaration syntax is that the
>declaration of something looks like the way that you use it. I agree
>that it's debatable how good an idea that turned out to be. -John]


Dennis Ritchie has commented that in retrospect, the declaration syntax
would have worked *much* better if the indirection operator had been
postfix rather than prefix. The declare-it-like-you-use-it syntax is not
the real villain here; the big problem is the confusing mixture of prefix
and postfix operators.
--
When failure is not an option, success | Henry Spencer henry@spsystems.net
can get expensive. -- Peter Stibrany | (aka henry@zoo.toronto.edu)


Post a followup to this message

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