Hacker News new | past | comments | ask | show | jobs | submit login

> When I mention Rust having the marks of a being from the C++ world, I'm referring to a property of the language that it shares with Swift.

But what property is that?

> I saw where Hejlsberg once said that he doesn't get why people draw comparisons between C# and Java [...]

That's very amusing!

> Rust certainly has a C++-style syntax, but aside from curly braces, idiomatic Rust looks alien when compared to C.

For sure. But I'm still not sure why you say it's from C++ land. It's definitely more like C++ than C, but JavaScript is also probably more like C++ than C. That doesn't mean JavaScript is actually anything like C++, really.

One thing that I thought of that Rust definitely does share with C++ (and C) that other languages (Swift) don't is that you don't have to decide at class definition if a type will be heap allocated or used as a reference vs value, etc. That's decided at the use-site.




C++ programmer of ~10 years here (Google Chrome, mostly).

Rust feels very very much like C++ to me. All the memory ownership stuff is basically common patterns in modern C++ pulled down into the compiler and enforced.

Also arguing with the compiler about types feels very familiar from C++ :-/.


That's a good point. The ownership patterns are basically compiler-enforced best-practices of C++. Fair enough.




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

Search: