4 ms·
The "more ergonomic C" crowd is missing some important nuance.
by kristoff_it 6y ago
The "more ergonomic C" crowd is missing some important nuance.
- andrepd 6y agoYep. It can be "C but good" or it can be "a language with all these fancy features". It can't be both at the same time.
- dralley 6y agoZig is pretty close to being both at once, simply because they've found clever ways of combining existing features to avoid needing entirely separate features to accomplish the same goals. e.g. They avoid the macro system by leaning hard on compile-time evaluation, leveraging dead code elimination to replace preprocessor/macro-driven conditional compilation. They get generics in a similar way, by letting compile-time functions construct types. Varargs are implemented with anonymous structs, and modules are also secretly just structs, which makes interop with C much simpler. It's actually deeply impressive how far they've been able to go with a language that actually has quite a small number of separate constructs, and it doesn't feel hobbled by doing so.
- socialdemocrat 6y agoThis is all about creating orthogonal features. In any system where you are able to create a small number of features which combine in very flexible ways you can achieve a minimalist language together with immense expressiveness. Zig is in that category. It takes some powerful ideas and combine them in ways that gives Zig a lot of power despite a small feature set.
- johnnycerberus 6y agoWhat other languages are in that category? I think Lua is one, for a simple language I've seen insane magic built with it when it comes to metaprogramming.
- dnautics 6y agoThe features are coming out more slowly and it feels like things are asymptotically converging to what will be the language in 1.0