Re: The D Programming Language
"James Kanze" <james.kanze@gmail.com> writes:
True memory isolation is very nice, but I don't see how it helps make
bugs modular in practice.
Sure it helps. A lot, even, if you want it to. But it isn't a
panacea, or a silver bullet. It's just one more tool. It can
reduce the number of places where you have to look, even if it
won't tell you exactly what's wrong.
Why all the extremist positions? You're saying it won't help;
No, I was saying "show me, because I don't see it."
Andrei says it eliminates all forms of undefined behavior.
IIRC, he was saying it makes the bugs _more_ modular.
Of course, this means that other threads can see pointers to
objects which aren't yet constructed. But that's generally true
in Java, even without threads; just call a virtual function from
a base class constructor. Worse, other threads can see pointers
to objects which haven't yet been zero initialized (or
initialized at all). That is, of course, the undefined behavior
that Java supposedly doesn't have. (I'm rather surprised that
Andrei doesn't recognize this. IIRC, he's written on the
problems of double checked locking in the past, and this problem
is related.)
Wow. I'm out of my element here, but it does sound sticky.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]