My brilliant idea for "any VLA type" was thwarted because of the stupid rules for array declarators in parameters goddamn I hate that language rule soooooooo much.
@thephd who is the ruler of the rules though, hm? Would it be perhaps you who proposes language features?
@thephd if you're being brilliant and the language is stopping you, clearly just change the language to allow you and everyone else to thrive
@gaycodegal Alas, backwards compatibility 😔

@thephd

@gaycodegal

C99 already had the option to make

void f(int[6]);

mean something distinct from

void f(int *);
void f(int[60]);

and decided that the backwards compatibility case for people writing in a constant number but not really meaning it, was more compelling than turning obviously-wrong declarations into errors

instead you need a new keyword (that is widely misunderstood and hated) if you want it to even be eligible for a warning

(in WG14's defence we more or less agreed "morally" to fix this per a proposal by @uecker but didn't get to it in the C23 cycle)

@erisceleste @gaycodegal @uecker Good ol' ancestors not saving us by choosing compat over boldness. Same situation where everyone complained to me about nullptr in C. But, when we had proposals before to mandate #define NULL (void*)0, to prevent the issues that obviously came up with ... functions and similar conceptual problems with not-exactly-constant-zero being used to initialize a pointer, they all got weak in the knees and rejected it.

So now, you have to do the "well, we have to simplify the situation by adding something new". And then people get all pissy when if they had ever put in the work to make 0 a less attractive option for the null pointer, or done even a deprecation 20 years ago we'd have a leg to stand on and a reason to fight for something today.

But they didn't.

So we don't.

@erisceleste @gaycodegal @uecker Call K&R whatever you want, but they were so on-the-ball with understanding that people in the future deserved better. They nuked-from-orbit the literal function declaration and definition syntax that had their name on it — from the very first standard version of C — by putting it in deprecated.

They understood it was better to look to the future rather than endlessly cling to what had been.

I wish people who worked with C today were even a smidgen as brave as those two.

@thephd @erisceleste @gaycodegal @uecker posts like this makes me wonder how feasible it would be to like. fork C. and turn it into a new C-like language unencumbered by historical artifacts

and before anyone brings up C++: no not like that

@eniko @thephd @erisceleste @gaycodegal @uecker this has been probably been considered already by people more knowledgeable than me or whatever, but how about rather than forking C, putting a pre-processor on it? Not like early C++ adding new features, just taking a semantically nice subset of C and making it syntactically nice to use? So you could add some ugly syntax to C that does what ThePHD wants, and then give a nice syntax to it in this hypothetical C frontend.

@lonjil

@JensGustedt has one at Shnell https://gustedt.gitlabpages.inria.fr/shnell/

there's no upper limit to what languages you can just compile to C if you like though, and of course there's a ton of variations on PreScheme and parentheC for instance that use Lisp notation to describe C semantics directly (so you can use much more powerful Lisp macros)

Objective C started as such a beast, too

shnell – source-to-source compiler enhancement

@erisceleste Soon, there will also be lip, the language independent preprocessor, with a C and C++ compatible specification, bindings for other languages including md, an open source implementation and plenty of new features, such as `#expand` and `#bind`, programmable recursion
@erisceleste In fact it is now called eĿlipsis, is released, and implements all these nice features https://gustedt.gitlabpages.inria.fr/ellipsis
eĿlipsis: eĿlipsis, a language independent preprocessor