3 ms·
Looking at the language, I fail to see a point. It seems to fix things that are slightly nagging, but not real problems with c (lack of real modules, structs,
by earenndil 9y ago
Looking at the language, I fail to see a point. It seems to fix things that are slightly nagging, but not real problems with c (lack of real modules, structs, default arguments, integer sizes) while failing to fix the real problems (strings, buffer checks, metaprogramming, type introspection (_Generic doesn't really solve this, and neither does __typeof__(). A slightly enhanced __typeof__() plus a slightly enhanced _Generic might have a shot)).
No more includes/header files seems to imply no more preprocessor, which is a shame because while it may have been hackish, it was one of c's greatest strengths.
> more logical keywords (public/local replaces static)
My friends, have you heard of the wonderous c preprocessor?
#define func
#define local static
#define public
Agree with what comex said about compilation/building.
For a slightly nicer alternative to c, what about zig[1]?
1: http://ziglang.org/ http://ziglang.org/
- adamnemecek 9y agoWhy does no more headers imply no preprocessor.
- geezerjay 9y ago> Looking at the language, I fail to see a point. It seems to fix things that are slightly nagging, but not real problems with c (...) while failing to fix the real problems I agree. What caught my eye was how they kept C's "clockwise/spiral" rule for declarations. If their goal was to actually improve the language over C then it makes no sense to keep one of C's main shortcomings. Heck, even C++ improved on this problem by introducing support for trailing return type declarations in C++11. In addition, it appears C2 still lacks support for anonymous functions, which is simply absurd in today's age.