6 ms·
I hope that in the future, new code written is C will be seen as similar to using unencrypted communication on the Internet. It is not about how easy is it to
by phicoh 5y ago
I hope that in the future, new code written is C will be seen as similar to using unencrypted communication on the Internet.
It is not about how easy is it to write rust. It is about how, as a C programmer you are going to explain that your code is safe.
I know that as a long time C programmer, I still make occasional mistakes that lead to memory corruption.
In production code, there are still way to many pointer bugs. Use after free, etc. That needs to end.
- FpUser 5y ago>"I hope that in the future, new code written is C will be seen as similar to using unencrypted communication on the Internet." And I hope that people stop preaching and would live and let live.
- yjftsjthsd-h 5y agoHTTPS took off when Let’s Encrypt (and to some degree Caddy) made it easy to be secure. Rust is more like, I dunno, openssl: easier than doing everything yourself by hand, but not even remotely easy.
- phicoh 5y agoUsing C instead of Rust is similar to rolling your own crypto because openssl is too hard. There are easy languages like Python or Go. But they are not suitable for many low-level, high performance tasks. Rust is competing in the domain of easy to use languages. It is about low-level system code. Edit: Rust in not competing in the domain of easy to use language
- yjftsjthsd-h 5y ago> Using C instead of Rust is similar to rolling your own crypto because openssl is too hard. Probably, yeah. At least in a world where openssl is actually so hard that doing stuff yourself seems like a reasonable idea, because theoretically secure doesn't do anything for you if the thing is too hard to actually use - there's a reason PHP utterly dominated webdev even when it sucked for security. > Rust is competing in the domain of easy to use languages. Then it loses. If you meant to write that Rust is not competing for easy to use, then it loses separately, because technically superior but too high of a barrier to entry still loses (there is a reason we aren't all exclusively running software written in Ada on OpenBSD).
- pyjarrett 5y agoIn what way does Ada have a high bar to entry? You just need GCC to get started with it.
- yjftsjthsd-h 5y agoIt's not about compiling code, it's about being able to write it. IMO, C is easier to write than Ada. (Write badly, perhaps, but this is about the lowest barrier to entry)
- bluejekyll 5y ago> Rust in not competing in the domain of easy to use language In a sense Rust very much is competing in this space. Consider the extensions to JS (wasm), Ruby, Python, and others that make it easy to call out to Rust. This is being used for performance critical sections of code (or access to high quality stable network and security focused libraries). This competes directly with that native language but offers a path that is easier than C or other options. Rust appears to be finding a lot of success in that space.
- wheelerof4te 5y agoOh please. Preaching about safety in a globally inter-connected world devoid of privacy. Newsflash, it's not a language's job to make software safe. It's job is to make programmer's job as simple as possible: ie. writing new software. If your language fails to do that, people will not use it, plain and simple. How else could you explain the popularity of languages such as Python and Go?
- adgjlsfhk1 5y agoYou'll notice that both of those languages also give you safety by default. It's pretty much only C and C++ that still make programmers write artisanal memory leaks. I didn't really understand Rust, until I saw a Cppcon talk about how to use STD.unique_ptr correctly, and I realized that the rust borrow checker is just that talk implemented in a compiler.
- hiptobecubic 5y agoHow can you explain the popularity of big macs and coca-cola if the purpose of food is to help people build healthy bodies? Maybe your criteria isn't universal?
- wheelerof4te 5y agoWe are talking about software here, don't change the subject please. My language preference won't make me unhealthy.
- phicoh 5y agoIf your project can be written in Python or Go, then yes, do that. I don't think Rust is trying to compete with Python or Go. However, if the project needs a low-level language. Then skip C and C++ and use Rust. Almost from the start, high level languages have been about safety. In assembly, memory is untyped. That leads to way too many bugs. So languages evolved to get more eleborate type systems. Compare for example K&R C with lacked function prototypes with current C that does have them. That saved huge numbers of bugs. Traditionally, garbage collectors had to be used to maintain memory safety. However, that conflicts with many of the uses of C. So Rust had to come up with something that is both safe and compatible with C.