C/C++ style Crashes?

Alexander Panek a.panek at brainsware.org
Mon Jan 8 22:41:35 PST 2007


Steve Horne wrote:
> On Mon, 08 Jan 2007 19:30:12 +0100, Alexander Panek
> <a.panek at brainsware.org> wrote:
> 
>> And what exactly is it that makes D not solving this problem?
> 
> My reading of Jon Grants post...
> 
> : Does D still let the programmer allocate memory, cast addresses and read/write
> : direct address space as we can from C/C++?
> : 
> : I'd like to know if it solves this problem, Java and C# don't allow such access.
> 
> Is that the 'problem' is crashes due to pointer handling in C/C++.
> This 'problem' is 'solved' in Java and some other languages by
> basically banning pointer arithmetic.

Ok, I might have misunderstood something there. I thought the 'problem' 
would be that there's no language that allows both, high and low level 
access to memory.

> 
> Since D allows any pointer manipulation as C/C++, it can suffer the
> same crashes and therefore has the same 'problem'.
> 
> And my point is that the true problem is bad programmers who don't
> take responsibility for their code and don't know how to program. You
> can't fix that by banning language features.

This is very true.

> 
> So D has the same 'problem' that C and C++ have in relation to pointer
> handling, I just don't believe its a real problem.

Me neither, as you might have guessed already. ;)



More information about the Digitalmars-d mailing list