D mentioned on Rust discussions site

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat May 23 17:08:10 UTC 2020


On 5/23/20 9:18 AM, Dibyendu Majumdar wrote:
> On Saturday, 23 May 2020 at 02:37:23 UTC, Walter Bright wrote:
>> C missed some obviously great ideas. One is nested functions, which 
>> fit right in with C's semantics. The other is the fix for:
>>
>> https://www.digitalmars.com/articles/C-biggest-mistake.html
> 
> I do not think it was a mistake at all. Treating pointers and arrays 
> uniformly is one of the great innovations in C.
> 
> https://www.lysator.liu.se/c/bwk-on-pascal.html

The article does not support the argument. The article (section 2.1) 
discusses statically-sized arrays only, and the problem is that the size 
is part of the type; however, that's the case in C as well, as it should.

There's no doubt in my mind that the absence of a universal "doped 
pointer" (pointer plus extent) built-in or standard library in C has 
caused innumerable problems. The fact that early C versions could not 
return structs by value might have contributed to that decision.


More information about the Digitalmars-d mailing list