Why explicit cast?
janderson
askme at me.com
Sun Feb 11 15:36:30 PST 2007
Andreas Kochenburger wrote:
> I find it extremely annoying to have to write 'cast' before every C-like
> cast. The C-syntax is as clear as tap water, so why had this
> complication been added?
I've used languages that simplicity convert casts. They are a pain
because its so easy to accidentally convert something into something
else you didn't want. Admittedly there are some cases I think casting
could be ignored (or perhaps cast(auto)(...) or auto(...) ) however most
of the time they are necessary.
If you see code with lots of casts in it, its a sign something is wrong.
-Joel
More information about the Digitalmars-d-announce
mailing list