assert semantic change proposal

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 6 11:50:41 PDT 2014


On Wednesday, 6 August 2014 at 08:25:38 UTC, Walter Bright wrote:
> 4. everyone who wants faster assert optimizations will have to 
> rewrite their (possibly extensive) use of asserts that we'd 
> told them was best practice. I know I'd be unhappy about having 
> to do such to my D code.

Also having the same syntax for both kinds of assert makes it 
easier to try unsafe optimizations: the code can be written safe, 
then unsafe optimizations can tried effortlessly and performance 
gains evaluated. In C one would only need to edit the macro to do 
this. Whether we want to allow such experiments is debatable, but 
I find it at least reasonable. One may also want the 
optimizations to propagate backwards for even more performance - 
this would be a different kind of optimization, which may or may 
not require yet another syntax.


More information about the Digitalmars-d mailing list