Interesting, but as probably all almost-C-but-better projects it is doomed to obscurity. I wonder why author did not use designated initializers from C99, as Safe-C was created in 2011, instead of his aggregate with names notation.
Problem with projects like this is similar (but worse) to problem of Python 2 to Python 3 migration. It is similar, because the code looks quite similar with few things cleared out. Worse, because original implementation(the C language as we know it) and this project does not have single entity behind it. So it will never be the successor to the C language.
I also like to think how almost-C-but-better could work, but outside of next versions of C standard I can’t see how it could ever gain adoption (even C standard struggles). If clang or gcc will not implement the feature it does not exist.
I would really like to see next-generation C, that does not look too similar to C. The low-level (if you say that C is high-level, I hope that we can agree on it being mid-level :P) language that is not exactly safe, but certainly one that is a bit more expressive. One that does not require compiler specific incantations (like __attribute__) or fighting with optimizer to not overoptimize. Such a language also needs perfect C FFI. There is Jai language idea, that is nice and maybe could have momentum. Rust and Go can serve the purpose, but only to some degree.
However in *nix land we would also need a next-generation stdlib/POSIX for next-generation C. Not exposing all stdlib/POSIX/system-call interfaces as in C (dup, dup2, dup3, pipe, pipe2, mktemp). Old race-condition including idioms should not be available in C-ng.
I think if such a language will come it will be a hit, but never in the size of original C. Also I am starting to bet on Rust even though it’s not what such an effort is about.
I am starting to bet on Rust even though it’s not what such an effort is about.
Isn’t it? It has very good C FFI. Pretty much everything that’s in it and not in C is something a good modern language needs. How would your C-ng differ from Rust in practice?
It mostly comes down to the accent. It depends if you value writing speed more (arguably shorter write-compile-test times) or debugging speed more (arguably less debugging needed in Rust).
I agree that it is a weak sentiment. Especially, because I don’t really know Rust. Such C-ng seems to me better suited for quick and dirty projects (protojects/projotypes? ;)). It should not be used for anything critical. But if it would be a wide success certainly we would see once again prototypes promoted to products (prodotypes/protoducts? :)).
I think C-ng could serve a valuable niche. But I hold my broader hopes for Rust.
This looks great! But why is it Windows only? :(
Why UTF-16? IMO, no one wants UTF-16 in China or Japan…