Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)


I 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.


"out of C into a language with no buffer overruns, and in general much stronger security and correctness guarantees."

Doesn't sound like C++.


I 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...


You 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.


Really? It sounds like a good fit to me, maybe I'm missing something?


None 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.


If 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.


It is only nearly a superset because it contains all the features of C except for a few like implicit pointer casts.


That's nearly as in "most of C's features are supported by C++", not "most of C++'s features are C features".


C++ 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

Oh well, at least they're moving from C, which will be a big win either way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: