opImplicitCast/opImplicitCastFrom

bearophile bearophileHUGS at lycos.com
Mon Oct 27 07:25:32 PDT 2008


KennyTM~:
> The Bounded!() (originally Positive!()) template suggested by Andrei 
> earlier?

No, I mean something built-in, and generally invisible. See ObjectPascals.


> When a programmer cares for integer overflow one can use Bounded!(T.min, T.max).

Nope. It has to be the other way round: when a programmer doesn't care of avoiding some integer-related bugs he/she/shi can add a "-release" to the compilation arguments. Forcing the programmer to use an ugly and long syntax everywhere in the program isn't a way to avoid that class of bugs in most D programs.

Bye,
bearophile



More information about the Digitalmars-d mailing list