www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: How does D improve design practices over C++?

reply ore-sama <spam here.lot> writes:
Walter Bright Wrote:

 Janderson wrote:
 - More restrictive casting


 - Warnings on implicit casts that lose bits

Oct 30 2008
parent reply Janderson <ask me.com> writes:
ore-sama wrote:
 Walter Bright Wrote:
 
 Janderson wrote:
 - More restrictive casting



We'll C++ allows C casts for instance. Also C++ you can static cast something that should be dynamic. Also in D you can't easily cast an array to a pointer (although you can go array.ptr). There are fewer implicit casts allowed (particularly for unsigned/signed). See: http://www.digitalmars.com/d/2.0/type.html I think there are a couple of others but I can't remember them at the moment.
 
 - Warnings on implicit casts that lose bits


Oct 30 2008
parent ore-sama <spam here.lot> writes:
Janderson Wrote:

 I think there are a couple of others but I can't remember them at the 
 moment.

Oct 31 2008