4 ms·
I picked C over C++ in an quasi-embedded environment given we would have a team with highly variable C/C++ skills. I was worried people would get too fancy wit
by mschwaig 8y ago
I picked C over C++ in an quasi-embedded environment given we would have a team with highly variable C/C++ skills.
I was worried people would get too fancy with C++. Probably it would have been fine if we would have taken away most of the language.
It turns out the problem with C in that setting was that good C code seems to require a lot of ceremony and conventions for things like error handling and modularity.
I hope that Zig (https://ziglang.org https://ziglang.org) will become a viable alternative in that space. It's quite a small language, more comparable to C than to C++ or Rust. It's meant to result in similar LLVM bitcode as well-written C, while being highly compatible with C and and giving you some extra safety guarantess over C as well.
- youdontknowtho 8y agoHelp me out... Why not use a C or Algol derivative syntax?
- mschwaig 8y agoI think the syntax is not too far off from C. I am not affiliated with the project, only supporing it on Patreon, so I cannot speak about the designer's intentions with Zig specifically. Generally in language design, if something works the same way as in other languages, that's great. You can re-use the keywords/syntax and build on peoples prior knowledge. However if you have some feature that actually works quite a bit differently from other languages the syntax should probably be different. Otherwise people might feel at home right away on a superficial level, but actually get bitten by the surprising ways in which the new thing works differently to the one they are used to later.