Am 31.07.2014 21:46, schrieb H. S. Teoh via Digitalmars-d:
On Thu, Jul 31, 2014 at 09:37:11PM +0200, Daniel Gibson via Digitalmars-d wrote:
[...]
This thread however shows that many D users (who probably have more D
experience than myself) are not aware that assert() may influence
optimization and would prefer to have separate syntax to tell the
optimizer what values he can expect.
[...]
AFAIK, the compiler currently doesn't use assert as a source of
information for optimization, it's just being proposed.
Walter said that he implemented assert() as a language feature to allow
this, so it's at least planned.
And, as I wrote, if this was/is planned, people should have been told
about it *explicitly* in the language documentation, so they can make
sure to use assert() accordingly.
Cheers,
Daniel