On 7/30/2014 3:20 PM, Artur Skawina via Digitalmars-d wrote:
On 07/30/14 23:42, Walter Bright via Digitalmars-d wrote:
On 7/30/2014 2:34 PM, Timon Gehr wrote:
He understands that and notes that this contradicts the promise of @safe.
No, it does not. @safe never promises that "all your asserts are correct".
@safe's promise is one of memory safety, not a promise of program correctness.
void f(ubyte[] a) @safe { assert(a.length>99); a[88] = a[77]; }
The compiler will insert array bounds checking for you.