On Thursday, 2 February 2017 at 09:14:43 UTC, Paolo Invernizzi
wrote:
On Wednesday, 1 February 2017 at 21:55:40 UTC, Dukc wrote:
On Wednesday, 1 February 2017 at 19:25:07 UTC, Ali Çehreli
Regarding that, I have trought that wouldn't it be better if
it was bounds checking instead of debug vs release what
determined if in contracts are called? If the contract had
asserts, they would still be compiled out in release mode like
all asserts are. But if it had enforce():s, their existence
would obey the same logic as array bounds checks.
This would let users to implement custom bounds checked types.
Fibers for example could be made @trusted, with no loss in
performance for @system code in release mode.
The right move is to ship a compiled debug version of the
library, if closed source, along with the release one.
I still don't understand why that's not the default also for
Phobos and runtime....
/Paolo
It is, for both official dmd downloads and ldc:
https://www.archlinux.org/packages/community/x86_64/liblphobos/
Some packages may leave it out, not sure why.