D defined behavior
Luís Marques
luis at luismarques.eu
Mon Apr 27 16:42:33 UTC 2020
On Monday, 27 April 2020 at 16:10:12 UTC, welkam wrote:
> casting out immutable or const and then modifying the value
> would lead to incorrect code.
Ah, yes, I should have phrased it to make it clear I didn't have
that kind of thing in mind.
In your example we are in the realm of "well, you promised
something and then you didn't follow through, and this is
@system, so you're on your own". Whereas things like evaluation
order, alignment, etc. could arguably all be specified such that
D does the right thing, even in various cases where in C they
would be undefined behavior.
More information about the Digitalmars-d
mailing list