Const sucks

0ffh spam at frankhirsch.net
Tue Sep 11 11:27:50 PDT 2007


Janice Caron wrote:
>> So, if you'd do "macro x=5;" (or whatever the macro syntax will be),
>> and you try `char[] s="abc"~x;` you'll get a nice, clean type error.
> Looks the same as C to me.

Isn't!!!111!!

> #define x 5
> strcat(s,"abc");
> strcat(s,x); /* compile error */
> 
> That doesn't count as strong typing.

It is! You'll be able to do "typeof(x)" and probably get "int"... :-)

Regards, Frank



More information about the Digitalmars-d mailing list