3 ms·
> I think Zig, D are examples of this niche but syntax wise they don't completely look like C. That is because C's type declaration format is provably, as in a
by com2kid 4y ago
> I think Zig, D are examples of this niche but syntax wise they don't completely look like C.
That is because C's type declaration format is provably, as in actually provably, terrible.
There is a reason the majority of modern languages have switched away from how C declares types.
Honestly it'd be nice if the C committee could find a way to tack on a new variable declaration syntax to C, so everyone didn't have to keep looking up, or using tools, to declare non-trivial function pointers.
- __d 4y agoPlease, just no. The C committee should do basically nothing. If someone, somewhere, finds an actual bug in the spec, then fine -- fix that. But don't go adding new features. If you want something new, then make a new language. Leave C alone.
- Gibbon1 4y agoAs someone who actually uses C I think the C standards committee needs to be taken on a one way to trip out behind the barn for the crime of being useless. They've had 30 years to fix things like C not having arrays, lack of modules and name spaces. Purists can always use std=-c89.
- com2kid 4y ago> If you want something new, then make a new language. Adding an optional new declaration syntax isn't a new feature, it is a change to the parser. C's declaration syntax is awful. In fact I'd go so far as to claim that one reason function pointers aren't heavily used in C as compared to modern C++, C#, JavaScript, etc, is purely because the syntax around them is so awful. (They obviously are used, but no one likes using them)