Live data from Hacker News

Ask HN: Why do you use Rust, when D is available?

news.ycombinator.com

251–260 of 262 posts

Re: Ask HN: Why do you use Rust, when D is available?

#251

Earlier quoted context omitted.

I’m currently trying to get into robotics. But why does everyone want c++? Surely robots can be programmed in other languages.

As a datapoint/anecdote, I work in an autonomous vehicle company and we have adopted Rust extensively in our codebase in the last six months or so. Previously, the code base was primarily Python with some C++. Now there is a significant chunk of code, particularly related to safety, written in Rust.

That's interesting. But did your company consider using D? if so, why did chose Rust?

Re: Ask HN: Why do you use Rust, when D is available?

#252
post #180

Earlier quoted context omitted.

Rust is very very new compared to Cpp. People have decades of experience with cpp, learned in in University. Why would you throw all of that overboard just to learn a fancy new language with a weird ownership system? Keep in mind that people often still write cpp98 and have a rely hard time getting used to newer cpp concepts and programming styles. And all of that is backwards compatible with their existing codebase.

It will sound harsh, but people who can't up their game from C++98 to C++11, are probably not a people that I would consider hiring anyway. Generally, personally I would not hire anyone that knows just one programming language that they've learned in University and for years didn't manage to practice anything else, but that's just me. I actually worked in Automotive, and the software higher level up the stack there i…

If D have had a proper tooling, like C# and VS, do you think companies in the automative would consider to use D instead of C++?

Re: Ask HN: Why do you use Rust, when D is available?

#253

Earlier quoted context omitted.

I’m currently trying to get into robotics. But why does everyone want c++? Surely robots can be programmed in other languages.

Probably the same reason Python is big in scientific computing. A lot of stuff has already been written for it. If scientists needed to bootstrap scientific computing from scratch, Python wouldn’t be any more established than Rust, Java, PHP, or VB6.

Python is easy to just start writing then the network effect made others use it

Re: Ask HN: Why do you use Rust, when D is available?

#254
post #185

Earlier quoted context omitted.

Are you saying AAA-game/kernel/embedded developers are not normal? Pretty uncalled for if you ask me.

Depends on how you define normal. :D I offended a lot of C++ fans, I guess. I guess what I meant is "vast-majority of devs out there". I did ~10 years of kernel/embedded myself. Generally people use C++ only when they really have to (like: they work in one of this niches, or want to get a job there). I've experienced myself many times when people would go with anything but C++ because of all it's faults, weaknesses a…

How aren't games so lucrative? did you any of your guys did try D before rust?

Re: Ask HN: Why do you use Rust, when D is available?

#255
post #28

Personally, at some point Rust was just clearly better and after a while - I lost interest in D. I don't have time to keep track of D catching up, when I'm so happy with Rust, and ecosystem is growing so fast. Maybe D got much better in last few years... but I kind of don't care anymore. It's hard enough to introduce a raising star like Rust to your coworkers and D just don't have traction anymore. I've been followin…

Normal people? Exactly what is a normal person there, Einstein.

Re: Ask HN: Why do you use Rust, when D is available?

#256
post #55

Earlier quoted context omitted.

> Normal people don't want to touch C++ anymore. Only people that think that CVEs are "just fault of bad developers" (LOL) can still be considering C++ a good language to start new projects in. Deliberately inflammatory, and also false. 1. Rust has limited abstraction features to make it more approachable and implementable, but make it unable to express libraries that are easy in C++. This will not change soon, altho…

I've been writing C++ professionally for 16 years. I'm doing it right now in fact, but snuck on to HN while a build is underway. OP is right, unfortunately. C++ is a dying language. Mozilla, Microsoft and Google are all looking at Rust. Why? Because it's probably makes more sense to rewrite a buggy C++ component in Rust instead of updating it to use modern C++ (where admittedly, you have to go out of your way to get…

I don't understand your claim that C++ is dying. Do you have data to back this up?

Re: Ask HN: Why do you use Rust, when D is available?

#257
post #55
post #28

Personally, at some point Rust was just clearly better and after a while - I lost interest in D. I don't have time to keep track of D catching up, when I'm so happy with Rust, and ecosystem is growing so fast. Maybe D got much better in last few years... but I kind of don't care anymore. It's hard enough to introduce a raising star like Rust to your coworkers and D just don't have traction anymore. I've been followin…

> Normal people don't want to touch C++ anymore. Only people that think that CVEs are "just fault of bad developers" (LOL) can still be considering C++ a good language to start new projects in. Deliberately inflammatory, and also false. 1. Rust has limited abstraction features to make it more approachable and implementable, but make it unable to express libraries that are easy in C++. This will not change soon, altho…

Excellent explanation! Couldn't have said it better myself.

Re: Ask HN: Why do you use Rust, when D is available?

#258
post #148

Earlier quoted context omitted.

The only language that one can honestly say that is dying (if not already dead) is VisualBasic. Perl and Delphi are probably going to continue to decline. Objective-C will be obsoleted by Swift some day, but is still relevant. Ruby's not too hot now, but far from dead AFAIK. Other than that it's nonsense to say that X is dying.

C++ is being blamed for allowing people to write buggy, insecure programs. In my mind, that's different to just becoming unpopular; it's dying because it's too dangerous and too complicated. Sure, it'll stick around for some years yet but all those jobs will become maintenance jobs. Very little greenfield projects will elect to use it outside of niche areas (games and maybe embedded - UK salaries for embedded dev are…

I would choose C++ because the tooling is superb, talent is widely available, it is performant, there are libraries for pretty much everything, and it's a great language.

Oh and by the way, LLVM is 100% c++.

Saying it is too dangerous and complicated is absurd. It is easy to write safe code in C++, having been doing it for almost 30 years.

You are throwing around lots of assertions - challenge you to back them up with real data.

Re: Ask HN: Why do you use Rust, when D is available?

#259
post #28

Personally, at some point Rust was just clearly better and after a while - I lost interest in D. I don't have time to keep track of D catching up, when I'm so happy with Rust, and ecosystem is growing so fast. Maybe D got much better in last few years... but I kind of don't care anymore. It's hard enough to introduce a raising star like Rust to your coworkers and D just don't have traction anymore. I've been followin…

> It's a C++-killer: same strengths, none of the weaknesses Not used Rust yet, used a lot of C++; isn't a weakness that it also is extremely slow in compiling? Not sure about others but to me that's a big weakness (if it still applies, but as far as I can find on Google it does).

Slow is relative. On my machine I can compile all of Chromium in ~15 minutes. I am one hugely impatient person when it comes to compile times, so I watch things closely.

But just like anything else given enough time, money and harddisk space anything is possible :)

Re: Ask HN: Why do you use Rust, when D is available?

#260
post #28

Personally, at some point Rust was just clearly better and after a while - I lost interest in D. I don't have time to keep track of D catching up, when I'm so happy with Rust, and ecosystem is growing so fast. Maybe D got much better in last few years... but I kind of don't care anymore. It's hard enough to introduce a raising star like Rust to your coworkers and D just don't have traction anymore. I've been followin…

> Industry really, really needed C-like language that was memory safe, and all-round good: both low and high level. And Rust quickly delivered that Well, almost. I'm not sure I like unsafe FFI and other bits. > Personally, at some point Rust was just clearly better and after a while - I lost interest in D. I don't have time to keep track of D catching up Yup. Better to use Rust if it's the one introducing the feature…

Support for unsafe constructs is almost critical to a languages success. There are certain things that just cannot be done safely, and any language that wants to be considered a systems language needs some method of providing that functionality. Usually native unsafe support is the cleanest way to go.
Post reply on HN