Live data from Hacker News

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

news.ycombinator.com

91–100 of 262 posts

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

#91

For those you want the context of D please check its development history [1]. If history telling us something, python only take off after 20 years and now D language is around the 20 years mark. But fortunately D has passed the growing pain similar to python 2 to 3 when it transitioned to D2. Personally I think D just need a big breakthrough in a form of a killer application like Ruby with RoR, and Go with Kubernetes…

Chrome may be using a lot of active memory, but I don’t think it’s a result of poor programming practices. So I don’t see how switching to Rust would solve the problem. Unless Chrome has a memory leak problem.

If anything, Chrome can just offload the contents of the unused tabs to the hard drive, and reload it when it becomes active again. But this will require a massive architectural change to the core program itself.

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

#92

The syntax is nicer. Granted, I'm not very familiar with D. I didn't even know it had a borrow checker. Rust took a lot of great features from Haskell, while keeping itself reasonably approachable from a C/C++/D/Java programmer's perspective. Rust put type names after variable/function/parameter names, which really cleans up the syntax nicely. Rust has very nice syntax for pattern matching, monads, and a slew of othe…

One of the reasons why I haven't approached Rust is its syntax. Subjectively ugly and polluted with punctuation symbols that tell you little about their semantics. D looks cleaner and more readable even for a person not familiar with the language. D's readability is on par with scripting languages. Rust is far away from that. Type names after variable or before? When you think about declaring a variable, do you think…

The reason behind putting the type after the variable is that the resulting syntax plays way better with type inference. Scala is a clear inspiration for Rust in that regard.

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

#93

The syntax is nicer. Granted, I'm not very familiar with D. I didn't even know it had a borrow checker. Rust took a lot of great features from Haskell, while keeping itself reasonably approachable from a C/C++/D/Java programmer's perspective. Rust put type names after variable/function/parameter names, which really cleans up the syntax nicely. Rust has very nice syntax for pattern matching, monads, and a slew of othe…

The elementary Rust syntax looks nicer. But once you start to do more intricate thing in Rust, then the syntax starts to look really ugly.

I think this is where Rust falls apart. In things like C, more features requires writing more C code. In Rust, more features requires learning more syntax features.

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

#94
post #71

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.

Because the real world doesn't really match the expectations and statements of the HN community. It's really rare that I see here anything pragmatic regarding what programming languages to learn/use. The community lives in a bubble and is out of touch with mainstream software development.

"pragmatic /praɡˈmatɪk/ adjective dealing with things sensibly and realistically in a way that is based on practical rather than theoretical considerations."

I consider Rust more pragmatic at this point. Perhaps it's because I code in C++ as my dayjob and have to deal with the consequences.

In theory, C++ is perfect given perfect developers. In practice, it's more sensible and realistic to write tricky, like multithreaded, code in Rust.

One rarely mentioned important factor: fear. It's much less scary to modify something written in Rust than in C++. Doubly so for less experienced developers.

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

#95
post #70

Earlier quoted context omitted.

>People who use Rust aren't using it to solve real world problems Like a browser? Or google's fuchsia? Have some fun: https://www.rust-lang.org/production/users You know what WASM is?

I understand that people who use and like Rust would find my comment off-putting but there is no need to be snide. There are precisely 0 job openings looking for Rust developers in my city, and I live in a city with millions of people. To me, that's the real world where real people solve real world problems. To me, when 0 people are hiring for Rust in a city in North America where there are maybe 10 other cities bigg…

>To me, that's the real world where real people solve real world problems.

Problems are technical, hiring is something completely different.

I live in a really small city and found 3 offers for Rust and 7 for Go (some of them are 'bonus points')...in Europe..and none of them are GAFA related.

But yes, it's a new language, java c/c++ is not.

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

#96
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…

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

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.

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

#97
post #70

Earlier quoted context omitted.

>People who use Rust aren't using it to solve real world problems Like a browser? Or google's fuchsia? Have some fun: https://www.rust-lang.org/production/users You know what WASM is?

I understand that people who use and like Rust would find my comment off-putting but there is no need to be snide. There are precisely 0 job openings looking for Rust developers in my city, and I live in a city with millions of people. To me, that's the real world where real people solve real world problems. To me, when 0 people are hiring for Rust in a city in North America where there are maybe 10 other cities bigg…

Its certainly growing. For such a young language, its being thrown at projects that would have required c/c++ previously.

here's one notable one https://onesignal.com/blog/rust-at-onesignal/

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

#98

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.

Afaik pythons success in that field is relatively recent, only really taking of ~2010. The language was already 20 years old by then. Compare that to rusts first stable release in 2015.

Building ecosystem just takes time.

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

#99
post #57
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…

1. Could you give a few examples of libraries that can’t be made in Rust due to lack of abstraction compared to C++? GUI libraries apart, I can’t think of anything offhand. 2. True, but growth curves are rarely linear. Here’s a rough proxy on users - the number of subscribers to /r/rust - https://subredditstats.com/r/Rust . Look at the growth between 2014-18 and 2018-2020. You’re extrapolating on current growth rate,…

1. Could you give a few examples of libraries that can’t be made in Rust due to lack of abstraction compared to C++?

I'm guessing, but I think that something like Armadillo[1] would not be possible on stable Rust. Something like Catch[2] might also difficult to make ergonomic.

I don't program in C++ anymore and I would personally live with the lack of expression/abstraction for a safer language though.

[1] http://arma.sourceforge.net/speed.html [2] https://github.com/catchorg/Catch2/blob/master/docs/tutorial...

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

#100
I wouldn't compare a WIP borrow checker, just added some months ago, against Rust.

However, where it's the bigger and unique thing that D haves. Fast and very powerful metaprogramming. Can do things like parsing a XML or JSON at COMPILE TIME and generate code. No body catches how powerful is this ? For example, imagine parsing a gtk-build /glade XML and generating the GUI code at compile time, instead parsing it at runtime.

Post reply on HN