automatic int to short conversion - the HELL?

Janderson ask at me.com
Thu Sep 18 00:07:53 PDT 2008


downs wrote:
> void main() { int i; short x; x = i; }
> 
> Excuse me, but - how exactly is it that this is in any way, shape or form valid code?
> 
> How can I trust a language that allows those kind of shenanigans?

I totally agree.  This should be an error.  You should be required to 
explicitly cast.

-Joel


More information about the Digitalmars-d-learn mailing list