Rust updates

Marco Leise Marco.Leise at
Tue Jul 10 00:23:48 PDT 2012

Am Sun, 08 Jul 2012 21:51:57 +0200
schrieb "Daniel" <wyrlon at>:

> On Sunday, 8 July 2012 at 13:49:50 UTC, bearophile wrote:
> > This seems a bit overkill to me:
> >
> > It's also possible to avoid any type ambiguity by writing 
> > integer literals with a suffix. The suffixes i and u are for 
> > the types int and uint, respectively: the literal -3i has type 
> > int, while 127u has type uint. For the fixed-size integer 
> > types, just suffix the literal with the type name: 255u8, 
> > 50i64, etc.
> >
> Many good ideas... am just singling out this one, as you seem to 
> be of a different opinion in this particular case... I on the 
> contrary wish D would have taken this route as well, because of 
> the ubiquitous 'auto' and 'implicit template instantiation' 
> features... furthermore vector simd types could also benefit.

Yes, this is the single most important Rust feature to me when typing. I've just had too many cases of mass-casts to ubyte or short where a suffix to the literal would only have cost one or two letters. 255ub = byte, 32000s = short


More information about the Digitalmars-d mailing list