Everyone who writes safety critical software should read this
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Nov 2 13:35:35 PDT 2013
On 11/2/13 1:25 PM, bearophile wrote:
> Where it's too much hard for us to tell what's the most intuitive
> behavour, it means the code is very anti-intuitive. Such code is going
> to make me scratch my head regardless what rule the D compiler will
> follow. So it's code that I refactor mercilessly to make it clear
> enough, splitting it in as many lines as needed. All this means that too
> much complex cases can be disallowed statically by the D compiler. This
> could break a little of code, but it's D code that today relies on
> undefined behavour, so turning it into a syntax error it's actually an
> improvement. So what I am saying is to define semantics for the normal
> cases, and just statically disallow the hardest cases.
I think you underestimate the fraction of the cases that would be
disabled. Pretty much any use where aliasing is a possibility would not
pass muster.
Andrei
More information about the Digitalmars-d
mailing list