Steve Yegge's rant on The Next Big Language
Sean Kelly
sean at f4.ca
Mon Mar 12 08:25:16 PDT 2007
Frits van Bommel wrote:
>
> I just thought of a semi-ambiguity. If the return type and the types of
> any parameters are user-defined, and all parameters (if any) are
> anonymous and implicitly 'in', the first part looks just like a function
> call: "foo(bar)" can then be either a call to a function 'foo' with
> parameter 'bar', or the start of a delegate returning a value of type
> 'foo' taking an anonymous parameter of type 'bar'.
It could also look like an object instantiation via static opCall
followed by a nested block of code. Excluding the separating semicolon,
of course.
> But since IIRC D already requires an infinite-lookahead parser, the next
> character (either a '{' or not) should disambiguate, which is why I only
> called this a semi-ambiguity.
Yup.
> Can anyone think of an actual ambiguity, or think of another reason this
> is not allowed? Barring fault, oversight or laziness (or perhaps just
> busy-ness) on Walter's part, of course :P.
I think the presence or lack of a semicolon keeps this from being a true
ambiguity.
More information about the Digitalmars-d-announce
mailing list