The cast(signed), cast(unsigned) feature proposal

monarch_dodra monarchdodra at gmail.com
Fri Jun 7 14:11:04 PDT 2013


On Friday, 7 June 2013 at 21:04:40 UTC, monarch_dodra wrote:
> On Friday, 7 June 2013 at 20:52:53 UTC, Mrzlga wrote:
>> That's it!
>>
>> Thanks for your consideration :)
>
> FWI, you can use std.trait's Signed and Unsigned as a partial 
> alternative.
> http://dlang.org/phobos/std_traits.html#.Signed
>
> IMO, not quite as elegant. I support this syntax. It's natural, 
> and I *think* the "keywords" are reserved anyways, so that 
> shouldn't be a problem anyways. We already have "cast(const)" 
> anyways, so cast(signed) is (imo) only natural. I'd almost 
> expect it to work.
>
>
> I think this isn't the first time it has been brought up 
> either. Unless I'm mistaken, user Bearophile has opened a 
> request for this. Not 100% sure though. Gonna look for it.

EDIT: Couldn't find it. Must have been my imagination. Didn't 
realize we had "signed" too (as opposed to "Signed"), so I'm not 
sure how useful that would be actually.

I still find it idiomatic though.


More information about the Digitalmars-d mailing list