bug in assigning to dynamic array element
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Nov 4 00:54:00 PST 2014
On Tuesday, 4 November 2014 at 01:52:00 UTC, ketmar via
Digitalmars-d wrote:
> sure, this decision will break some code. that's why it will
> never be
> approved, despite all hype about "safety".
>
> at least leaving this feature "as is" should help C++
> programmers to
> adopt D. they used to languages that has nothing common with
> sanity. ;-)
Yes…
http://en.wikipedia.org/wiki/Sequence_point
http://dlang.org/expression
D needs a major overhaul:
1. assigns should not be expressions, but statements
2. assign should be a sequence point, not UB.
3. re-allocation should always be explicit in non-library types.
Solves all issues.
More information about the Digitalmars-d
mailing list