Lars T. Kyllingstad:
> Instead, I propose the above operations be written like this:
>    int i = to!int(pi);    // The to function already exists in std.conv
>    int j = cast!int(pi);

I think this topic needs quite more thinking, but I agree that the current 
casts of D are not good enough and have to be improved. Probably your solution 
isn't the best design, but it's looks better than the current one. Merging all 
different kinds of casts in a single syntax is bad.

Bye,
bearophile

Reply via email to