assert semantic change proposal
bachmeier via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 5 16:15:03 PDT 2014
> But the 'newly proposed one' is the definition that I have been
> using all
> along.
+1. Until this came up, I didn't know another definition existed.
> The 'regular' definition of assert that you claim is what I see
> as
> the redefinition - it is a definition based on the particular
> implementation of assert in other languages, not on the
> conceptual idea of
> assert as I understand it (and as it appears to be intended in
> D).
In my view, it's also a redefinition of -release. My view is
influenced by Common Lisp. If you want speed, you test your
program, and then when you feel comfortable, set the optimization
levels to get as much speed as possible. If you want safety and
debugging, set the optimization levels accordingly. I was always
under the impression that -release was a statement to the
compiler that "I've tested the program, make it run as fast as
possible, and let me worry about any remaining bugs."
More information about the Digitalmars-d
mailing list