C++ bounded::integer library
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 19 16:01:44 PDT 2014
Nordlöw:
> I personally think we need a completely new language feature in
> D with which to compile-time-introspect function call arguments
> to check whether they adhere to certain requirements or matches
> for example the range of other given types.
I think "enum preconditions" are exactly that :-) But I don't
know if they are good enough, if they are a good idea, of if
there are better ways to do similar things. But I think something
like that is an useful improvement for D, able to remove another
limitation of user defined types compared to built-ins.
Bye,
bearophile
More information about the Digitalmars-d
mailing list