Fixing C's Biggest Mistake

areYouSureAboutThat areYouSureAboutThat at gmail.com
Fri Jan 6 02:51:07 UTC 2023


On Thursday, 5 January 2023 at 20:53:55 UTC, Dibyendu Majumdar 
wrote:
> Dennis Ritchie proposed fat pointers for C in 1990.
>
> https://github.com/kenmartin-unix/UnixDocs/blob/master/VaribleSized_Arrays_in_C.pdf

As per his proposal, I too like using the question mark for this: 
[?]

I'd be happy if C had this now (and I'm a 'big fan' of NOT 
changing the standard).

But if Dennis (RIP) could not get it into the Standard, then that 
tells you just how resistant to change, the C language is (and a 
good thing IMO, for the C language anyway).

Surely D could use int[?] also. I mean, it's 'contexually 
obvious' what is intended here, despite the ? being used for 
other purposes in the language.

It's not the dual use of ?, but the context in which its being 
used that matters.

int[?] arr = [0,1,2];  // perfect! IMO


More information about the Digitalmars-d mailing list