automatic int to short conversion - the HELL?
Chris R. Miller
lordsauronthegreat at gmail.com
Wed Sep 17 21:23:30 PDT 2008
downs wrote:
> Jarrett Billingsley wrote:
>> On Wed, Sep 17, 2008 at 10:26 PM, downs <default_357-line at yahoo.de> 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?
>>>
>> lern2warningsflag.
>
> "Warning. Your code is broken."
>
> I still claim it should actually be an error, although the only practical and correct solution might be full ranged type support.
I don't get it. Why can that not be simple implicit type casting?
More information about the Digitalmars-d-learn
mailing list