Hiding class pointers -- was it a good idea?

James Dennett jdennett at acm.org
Sat Aug 18 07:55:25 PDT 2007


Walter Bright wrote:
> James Dennett wrote:
>> Walter Bright wrote:
>>> C++ is loaded with idioms and conventions to try and head off major
>>> problems. I'd rather snip off such problems at the source - for one
>>> reason, it will dramatically reduce the learning curve of the language.
>>> For another, the more guarantees the language can offer, the lesser a
>>> burden it is on the code auditor, and the more likely the code is to be
>>> correct.
>>
>> Valid points, though removing expressive power tends to move
>> the complexity into code, and it's hard to remove the power
>> to write bad code without also removing the power to write
>> great code.
> 
> The counterexample I'd give is that D classes tend to be implementable
> with much less complex code than C++ classes.

One counterpoint to which is that most complexity in large
systems arises at larger scales than individual classes,
and then a language that allows you to express more of the
properties of a class tends to fare better "in the large".

But, as is sadly usual for our field, it's hard to provide
robust objective data to support either viewpoint, and we're
down to debating based on our (widely varying) experiences.

-- James



More information about the Digitalmars-d mailing list