Null references redux
Rainer Deyke
rainerd at eldwood.com
Sun Sep 27 11:56:40 PDT 2009
Jesse Phillips wrote:
> The thing is that memory safety is the only safety with code.
That is such bullshit. For example, this:
class A {
}
class B {
}
A x = new B;
No memory access violation (yet). Clearly incorrect. Detecting this at
compile time is clearly a safety feature, and a good one.
You could argue that assigned a 'B' to a variable that is declared to
hold an 'A' is already a memory safety violation. If so, then the exact
argument also applies to assigning 'null' to the same variable.
--
Rainer Deyke - rainerd at eldwood.com
More information about the Digitalmars-d
mailing list