On 11/18/2014 1:12 PM, H. S. Teoh via Digitalmars-d wrote:
On Tue, Nov 18, 2014 at 12:44:35PM -0800, Walter Bright via Digitalmars-d wrote:
On 11/18/2014 12:10 PM, H. S. Teoh via Digitalmars-d wrote:
On Tue, Nov 18, 2014 at 11:45:13AM -0800, Walter Bright via Digitalmars-d wrote:
I'm sorry to say this, but these rationalizations as to why C cannot
add a trivial enhancement that takes nothing away and solves most of
the buffer overflow problems leaves me shaking my head.
What's the trivial thing that will solve most buffer overflow
problems?
http://www.drdobbs.com/architecture-and-design/cs-biggest-mistake/228701625
That's not a trivial change at all -- it will break pretty much every C
program there is out there. Just think of how much existing C code
relies on this conflation between arrays and pointers, and implicit
conversions between them.
No, I proposed a new syntax that would have different behavior:
void foo(char a[..])