Why assert is in the language?
just at ask.me
Wed Jun 23 13:24:55 PDT 2010
Dnia 23-06-2010 o 07:05:42 dennis luehring <dl.soluz at gmx.net> napisał(a):
> Am 22.06.2010 23:07, schrieb Tomek Sowiñski:
>> Yes, why? It could be implemented in object.d in a similar fashion as
>> std.contracts.enforce. Does it do anything special that a library
> what about static assert?
I was asking about runtime assertions.
But actually, that might be the first decent reason to keep assert as a
keyword. Although there's no problem implementing it as in C++ (using
specialization of templates), the syntax nicely correlates with static if.
More information about the Digitalmars-d-learn