DIP19: Remove comma operator from D and provision better syntactic support for tuples
deadalnix
deadalnix at gmail.com
Tue Sep 25 02:50:17 PDT 2012
Le 25/09/2012 01:59, Andrej Mitrovic a écrit :
> On 9/25/12, Steven Schveighoffer<schveiguy at yahoo.com> wrote:
>> However, this brings up another issue, what about porting C code? All of
>> a sudden c style casts are no loner errors, but are type tuples!
>
> I think they're still errors:
>
> int x = (int)foo;
>
> Maybe the compiler could figure out if a cast was attempted rather
> than a tuple, and could print out the ol' "Can't use C shenanigans in
> D" error.
It will, because it is trying to parse an expression here, not a
declaration.
More information about the Digitalmars-d
mailing list