Idea: function contracts + CTFE
dennis luehring
dl.soluz at gmx.net
Fri Jun 20 14:01:14 PDT 2008
> Sounds totally unnecessary.
> if you pass 30 to the above fork you already know that it's not between
> 0 and 20 (that is if you finished 2nd grade of school).
just think of x 100 000 lines of code projects - not these 3 lines
examples - and think of projects that are growing over years ...
> you need help
> from the compiler when you do not know what x is, i.e. in run-time.
> I don't see any practical benefits to this outside of meta-programming
> and there I'd expect the compiler to throw the assert error during
> compilation.
why should the meta-programming section be more "safe" than normal
coding? both sides can benefit
More information about the Digitalmars-d
mailing list