C++, D: Dinosaurs?

Walter Bright newshound1 at digitalmars.com
Fri Nov 14 23:36:15 PST 2008


Tony wrote:
> That's why I think GC should be an opt-in rather than an opt-out 
> choice. That's a key characteristic of C++: opt-in. And I really, really 
> like that level of creative freedom.

I've used a GC with C++ (both the Boehm one and one I wrote myself). The 
idea that GC is opt-in in C++ is ok for the user, but not for the 
library writer. The poor library writer, faced with supporting both GC 
and explicit allocation, winds up stuck with the worst of both. The 
problem is when calling new, you cannot tell which you're getting. That 
just throws a monkey wrench into designing portable software, because to 
effectively use GC entails writing code in a different way.



More information about the Digitalmars-d mailing list