4 ms·
or just start moving away from using c. the last five years have brought nice alternatives like zig and rust
by gameswithgo 7y ago
or just start moving away from using c. the last five years have brought nice alternatives like zig and rust
- pjmlp 7y agoNot only the last 5 years, but I digress.
- Chlorus 7y agoYeah, it's kind of weird how little attention some of C's (historical)competitors in the systems programming space get. You'd think to see a lot of comparisons to whatever Ada* or Pascal would do in the same context. * Probably because the Ada practitioners are all trapped in Scifs somewhere in the inner mantle of the Earth.
- 0xdead 7y agoNo. I'd rather learn how to use my tools (that I have invested years to be comfortable with) properly than starting over.
- adamnemecek 7y agoC is not very productive.
- smabie 7y agoMaybe, but it’s super fun and elegant. C and Scheme are at the top of my “most elegant” list. Though, of course, for different reasons.
- erik_seaberg 7y agoI would have trouble convincing myself I'm capable of writing C that doesn't blow up randomly, when everyone else has been failing at that for my entire career and more.
- gnulinux 7y agoSo start over 40 years of progress? Everything in my OS is written in C. Why am I always told not to use this language in HN if it's what my computer runs on. It's dangerous, sure, but seems like as a software engineer it's something I need to learn instead of run away from.
- apta 7y agoProgress is exactly what brought us safe languages. Proper engineering dictates eliminating, or reducing as much as possible dangerous/unsafe/etc. behavior. There's a reason C and C++ top the CVE lists with their buffer overflows and undefined behavior. It's pretty much established that even expert C and C++ programmers, especially for larger code bases, will end up making some sort of mistake that will cause a security vulnerability or undefined behavior.
- gnulinux 7y agoThat's not my point, I don't contest that safe languages are safer. I contest the idea that we should "just use" something else. All my tools are written in C, the entire GNU toolchain is in C, how am I supposed to operate in this world if I "just don't use" C?
- apta 7y agoI think OP was implying not to write new code in C. If possible, we can also use replacement tools written in safer languages if they offer the functionality we need (e.g. `ripgrep` instead of `grep`, or web servers written in safe languages over those written in C/C++).
- boomer_joe 7y agoripgrep isn't POSIX compliant. It's hardly a proper replacement.
- burntsushi 7y ago
- deleted 7y ago[deleted]
- benibela 7y agoThat is why I use Pascal 20 years ago it was advertised as the safe C alternative.