Hacker News new | ask | show | jobs
by spacechild1 929 days ago
> However, there's nothing about C that prevents writing secure code in it

But it makes it exceptionally hard! Personally, I always try to use C++ over C for that reason (and many others). I also understand why some people prefer Rust.

1 comments

> But it makes it exceptionally hard!

I suppose that depends on what you mean by "hard". I don't think it makes it exceptionally hard at all, but it does mean you have to actually think about the design decisions you're making. I also consider that to be a good thing -- we should be carefully considering our design decisions.

> I suppose that depends on what you mean by "hard"

Compared to all other languages (except for assembly :)

> but it does mean you have to actually think about the design decisions you're making.

I don't believe that. How does thinking about passing the correct number of bytes to realloc() or memmove() help you think about design decisions? It rather takes away mental energy for no apparant gain.