4 ms·
I didn't understand why rust and go are natural alternatives to C. Wouldn't C++ be a more natural option? (Despite the fact that both go and rust are developed
by rafinha 10y ago
I didn't understand why rust and go are natural alternatives to C. Wouldn't C++ be a more natural option? (Despite the fact that both go and rust are developed by third party companies)
- jimbokun 10y ago"out of C into a language with no buffer overruns, and in general much stronger security and correctness guarantees." Doesn't sound like C++.
- shermanyo 10y agoReally? It sounds like a good fit to me, maybe I'm missing something?
- rafinha 10y agoI still don't get it. Can't it be done in c++ via appropriate data structures? I mean, it's not like Go is magic, at the end I suppose Go would be doing just that. As far as I know the main reason people opt for Go over C++ are the compiling times...
- steveklabnik 10y agoYou can write safe C++, if you're careful, and everyone you work with is careful, all the time. Judicious use of features can make your code more safe, but they can never make it actually safe. Rust and Go, in various different ways (and to various degrees), make it actually safe.
- jstewartmobile 10y agoI did a lot of C++ years ago, so maybe things have changed since then, but I think Rust and Go addressed a lot of the design flubs of C++. My experiences getting things to compile across gcc and visual c++, dealing with strings (especially Microsoft's WCHAR), reliable integer sizes (pre stdint.h), and debugging templates were not things I would wish on anyone. Re-doing some of my side projects in Go and Rust was a lot more enjoyable. I could focus on what I was doing instead of trying to work around deficiencies in the language and its libraries.
- AgentME 10y agoNone of the safety issues brought up about C there are solved by C++. C++ is (nearly) a superset of C, so it inherits all of those issues.
- silent_hunter 10y agoIf C++ is "(nearly) a superset of C" why is the C++ standard twice the size of C standard? Of course if we take that 0.505.. ≈ 1, then it is indeed a (nearly) superset.
- blub 10y agoC++ would be a great alternative, assuming the developer(s?) working on the project didn't hate it, as is the tradition: http://esr.ibiblio.org/?p=532 http://esr.ibiblio.org/?p=532 Oh well, at least they're moving from C, which will be a big win either way.