function argument 'shorthand'

Daniel Keep daniel.keep.lists at gmail.com
Thu May 25 01:49:27 PDT 2006



Bill Baxter wrote:
> [snip]
> 
> But when you say there's a grammatical ambiguity, can there actually be
> variables with the same names as types?  Isn't that against the rules?  So it's
> just a low level syntactical ambiguity you're talking about, right?  At the time
> you see the ', real' there's ambiguity but only until you check if 'real' is a
> type or not.

That's the problem.  That can't be done in a context-free grammar[1].
This means that the stages of parsing and semantic analysis aren't
independent, which is a big deal to Walter (and for good reason).

It's a good idea, and I like it; but you need to find a way to express
it unambiguously.

	-- Daniel Keep

[1] Note: this is based on my somewhat shaky understanding of what
"context free grammar" means.  I could very well be wrong, but my
intuition tells me otherwise.

-- 

v1sw5+8Yhw5ln4+5pr6OFma8u6+7Lw4Tm6+7l6+7D
a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP    http://hackerkey.com/



More information about the Digitalmars-d mailing list