How does D improve design practices over C++?

Tony tonytech08 at gmail.com
Fri Nov 7 13:54:50 PST 2008


"Janderson" <ask at me.com> wrote in message 
news:gf0fkd$4qh$1 at digitalmars.com...
> Tony wrote:
>>>
>>> In C++ its standard practice by most programmers to disable the copy 
>>> constructor for many of the classes they create.  Some companies it 
>>> mandatory to either disable it or implement one.
>>
>> I do that too: I "disable" (declare private and don't supply an 
>> implementation") the compiler-called class functions by default when 
>> designing a class and putting them back if they are needed.
>>
>
> You are repeating what I just said.  The point is D its opt in rather then 
> opt out which is the point of the original thread "improve design 
> practices".  In C++ if you didn't know you had to do that its something 
> you'd need to learn.  In D its not.

That's good, but it's the major features and their implementations that bug 
me, not the dozen or hundred nuisance things.

>
> C++ is a huge language, and not many know the entire language.  Case in 
> point, you didn't know what Delegates where

hehe, and still don't.

> yet many C++ programmers use them frequently.  Its better if the language 
> makes it easy rather then requiring the programmer to do something to be 
> correct.  Just like expecting an email program to have spell check your 
> emails.  Modern languages should do the same.
>

Tony 





More information about the Digitalmars-d mailing list