On Wednesday, 19 April 2017 at 18:40:23 UTC, H. S. Teoh wrote:

A few extra keystrokes to type cast(int) or cast(char) ain't gonna kill nobody. In fact, it might even save a few people by preventing certain kinds of bugs.

Yup. Not to mention one could have

@property
auto numeric(Flag!"unsigned" unsigned = No.unsigned, C)(C c) if(isSomeChar!C)
{
    return cast(IntOfSize!(C.sizeof, unsigned))c;
}

auto v = 'a'.numeric;

...or even have an equivalent as a built-in property of character types...

Reply via email to