3 ms·
Do these modern C-replacement languages like Hare and Zig have exactly the same security problems related to memory allocation, or do they have additional safeg
by vegai_ 4y ago
Do these modern C-replacement languages like Hare and Zig have exactly the same security problems related to memory allocation, or do they have additional safeguards against them that C does not?
- sanxiyn 4y agoBoth Hare and Zig fix "C's Biggest Mistake": https://www.digitalmars.com/articles/C-biggest-mistake.html https://www.digitalmars.com/articles/C-biggest-mistake.html.
- lelanthran 4y ago> Both Hare and Zig fix "C's Biggest Mistake": https://www.digitalmars.com/articles/C-biggest-mistake.html https://www.digitalmars.com/articles/C-biggest-mistake.html. I think any new language (including Rust, Go, Nim, etc) that wants to displace C should not be trying to fix C's biggest mistake, it should be trying to replicate C's biggest success: simplicity. Hence the growing popularity of Go as a C replacement. I look at Zig and Nim, and they look like viable replacements too. Time will tell.
- linkdd 4y ago> Hence the growing popularity of Go as a C replacement. Fun fact: I've seen more Python projects being rewritten in Go than C projects being rewritten in Go. Is Go a Python replacement?
- lelanthran 4y agoCould be both a C and a Python replacement? Go seems to present simplicity as a selling point, so looks to be a natural next step for both C and Python programmers.
- wtetzner 4y agoC sometimes appears to be simple, but there's a lot of complexity in the language. It's just well-hidden until it bites you.
- darthrupert 4y agoNim is many good things but I don't think simple is one of them.
- vegai_ 4y ago>I think any new language (including Rust, Go, Nim, etc) that wants to displace C should not be trying to fix C's biggest mistake Every new language should fix every older mistake that can be done "for free", without growing the language too much or complicating things. C certainly has plenty of those.