Suggestion: object const'ness

Tom ihate at spam.com
Sun May 21 15:14:54 PDT 2006


ChristopheBourez escribió:
> In article <e4q2jv$2pil$1 at digitaldaemon.com>, Hasan Aljudy says...

[...snip...]

> We are not advocating in favour of C++. There are some idioms independent of the
> language. OOP is one, generics/template is another, RAII and so on (all present
> in C++). The only thing we are trying to explain is that there is also the
> const'ness concept. And it should be good to think about it. And nobody says
> that this concept must be implemented the same way as it was in C++.

I'll always fight for D to implement in some way these features. If I 
can't make it, it's not the end of the world, we just accept it and 
period. Despite all these details I'd love to see implemented/improved, 
D is a great language yet!

>>> I know that Derek. Just that *many* of the users that come to D, don't 
>>> know if you realize it, comes from the C++ world. It's understandable, 
>>> we like the features of C++ but hate the syntax (and other stuff) and we 
>>> see D as a better C++. It's perfectly natural to try to achieve the same 
>>> things in D that we've achieved in C++. Don't be afraid, I'd hate to see 
>>> D become another C++ (and that's not gonna happen for sure).
> 
> Thank you, Tom, it is well summarized.

You're welcome.

[...snip...]

>> It's not just the syntax that's different, it's a lot of features too.
>> For example: objects are always by reference, never by value.
>> This make for a huge difference; it results in a completely different 
>> behaviour in many situations. (for the better).
> 
> A good C++ programmers already used "objects by reference ala Java": it is a
> little bit different and sometimes(often?) called boost::smart_ptr<T>. Don't
> think that C++ programmers are writing always bugged code.

That's right! After all, DMD is a C++ product, isn't it? :)



More information about the Digitalmars-d mailing list