OSNews article about C++09 degenerates into C++ vs. D discussion

Walter Bright newshound at digitalmars.com
Mon Nov 20 11:16:02 PST 2006


Don Clugston wrote:
> Walter Bright wrote:
>> Boris Kolar wrote:
>>> I don't understand why a good RIAA is not already a part of D. C++ 
>>> has it, so
>>> it obviously can be done. The new 'scoped' keyword is insufficient 
>>> for me,
>>> because I'd like to make all my classes scoped. I can usually develop
>>> 99% of my C++ code without a single 'new' or 'malloc'. Most of my 
>>> classes
>>> are small (average ~2 fields and ~4 methods) and only used locally, 
>>> so I'm
>>> really angry when I think about negative performance impact they will 
>>> have
>>> in D simply because a decent RIAA is missing.
>>
>> Have you considered using structs instead of classes? They are 
>> allocated on the stack.
> 
> Can you do RAII with them?

No. But most RAII usage is for managing memory, and Boris didn't say why 
he needed RAII for the stack allocated objects.



More information about the Digitalmars-d mailing list