Rust updates

Walter Bright newshound2 at digitalmars.com
Fri Jul 13 11:04:53 PDT 2012


On 7/13/2012 3:21 AM, Marco Leise wrote:
> The cases of 'auto' return or assignment can be worked around by not using
> auto and may be artificial. Yet it feels like auto is partially broken,
> because I cannot directly write down 8- and 16-bit integer literals like so:
>
> auto code(...) { if (...) return 42us; return 123us; } immutable Magic =
> 0x1234us;

    auto code() { return cast(ushort)42; }

works fine. There isn't really a lack here, just some more typing. I just don't 
see the case coming up hardly at all.





More information about the Digitalmars-d mailing list