▲ | sylware 4 days ago | ||||||||||||||||||||||||||||||||||||||||
More real life C compilers is always a good thing. But remember: to be able to build a linux kernel, you will need zillions of gcc extensions... (I have a sweet spot for the alignment attribute of stack variables in printk). That said, "C" (C99 with benign bits of c11 required for modern hardware programming) is only the "less worse" compromise for a computer language: its syntax is already way too rich (I let you think about the beyond sanity computer language syntax out there, yep... even for currently hyped ones). For instance: C should have only one loop keyword loop{}, finally a real hard compile time constant definition, no integer promotion, no implicit cast (unless void* or some generic number literals), probably explicit static/dynamic casts (but certainly not with the c++ syntax), sized types should be primitives and not the other way around (s32,u32,f64...), no typedef/typeof/generic/etc, but should include inline support for modern hardware architecture programming aka memory barriers/"atomics"/explicit memory unaligned access, etc. The benchmark is a small team of average devs should be able to develop a real-life compiler in reasonable amount of time. Ofc, the more the merrier. | |||||||||||||||||||||||||||||||||||||||||
▲ | 1718627440 4 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||
> C should have only one loop keyword loop{} How do you implement do while loops? Also I find the niceties of for loops a good improvement. You are able to limit the scope of variables to only the loop, while still being able to use it in the condition, and it separates the transition from the real loop code. I think idiomatic in C is the overuse of for, resulting in while used really seldomly. What else do you think is really excessive in syntax alone? | |||||||||||||||||||||||||||||||||||||||||
|