Feature request - type inference for new
BCS
ao at pathlink.com
Tue Jun 17 09:31:06 PDT 2008
Reply to Yossarian,
> Dne Mon, 16 Jun 2008 21:33:58 +0200 Jason House
> <jason.james.house at gmail.com> napsal/-a:
>
>> I'd prefer using the auto keyword as a replacement for the missing
>> type... ie. the following candidate syntaxes:
>> funky = new auto;
>> funky = new auto();
>> c = new auto(a,b);
>> c = new auto(b,a);
> I'm not sure, if this suggestion doesn't break the language
> context-less
> grammar.
> imagine:
> auto c = new auto ();
>
> .. what now? This is nonsense, but gramatically correct.
>
That's fine, the syntax doesn't catch everything.
this is valid syntax right now but doesn't pass the semantic checks:
int a = 1;
char[] b = "abc"
auto c = a ~ b;
More information about the Digitalmars-d
mailing list