Live data from Hacker News

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

news.ycombinator.com

31–40 of 262 posts

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

#31
post #25

Phobos/Tango. GC, then optional-GC. Compiler support for various platforms was wonky, never sure if I was using the right one. D as of now is a worthy competitor to Rust, it wasn't always the case, it was more like Go, with the GC. I hit some snags and moved on and didn't go back. I am sticking with Rust. I think a question with closer alignment is, "Why use Go when D is available" ? D feels like a 5x better Go, not…

Why did go took off then?

For a bunch of reasons, but one of the most important was it had Google's backing.

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

#32

Because Rust is new and shiny. People who use Rust aren't using it to solve real world problems, they're using it to scratch a novelty itch. D is a tragedy in my opinion. It's an excellent language that just doesn't fit the political needs of any of the big players. We have Swift which is a worse version of C#, we have Go, we have Java. Why don't we have a single language so that we can do cross platform development…

> Why don't we have a single language so that we can do cross platform development and abandon web browsers and javascript? What does that even mean? What do you lack in regards to cross-platform from Java / Rust / Nim / Go / Python / Ruby / Haxe / ...? (I'm assuming cross-platform here means desktops, not microprocessors) Specifically, yes, there are things that you may miss in every one of them, but it's not like w…

He means cross platform ui frameworks. Afaik, only flutter has support for most platforms. It supports web, desktop and mobile.

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

#33
post #25

Phobos/Tango. GC, then optional-GC. Compiler support for various platforms was wonky, never sure if I was using the right one. D as of now is a worthy competitor to Rust, it wasn't always the case, it was more like Go, with the GC. I hit some snags and moved on and didn't go back. I am sticking with Rust. I think a question with closer alignment is, "Why use Go when D is available" ? D feels like a 5x better Go, not…

Why did go took off then?

It's impossible to measure how much impact just having Rob Pike and Google behind Go has had on its adoption.

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

#34

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…

Judging by https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in... it's a pretty recent addition.

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

#35
post #9

Engineers learn languages because of success stories by other companies—not by the merits of the syntax or one-off tricks like compiling itself in 5 seconds. The fact that Firefox uses Rust for the browser engine or that Dropbox uses Rust for the sync engine is the kind of thing that gets me interested.

I've never heard of a commercial success built off the back of Racket or J but happily went through a book on Racket and would love to do the same for J.

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

#36
A mix of misteps by D, and some unique advantages of rust.

* Releasing D under a closed source license was a non-starter. This has killed every language that has tried in the past 30 years.

* Garbage collection was really the only memory management until recently. Manual memory management has always felt clunky and tacked on. Ownership and borrowing came really late to the game in comparison with rust.

* Rust embraced all of the best parts of ML, like algebraic data types and pattern matching and strong static typing, but combined them in a package that made for extremely fast software with low resource utilization and static memory management. They combined it with hygienic fully typed macros. They added type classes, securing the majority of the benefits of OOP while still maintaining a functional style.

Whereas Rust has taken influence from a broad range of PL research, functional programming concepts, high assurance concepts, etc., and applied them to system programming, D has always just felt like C++ with garbage collection.

The one area where I think D still has an advantage over rust is GUI development. Functional programming advocates make lots of platitudes of functional reactive programming, and there are no shortage of toy examples for it, but when it comes down to industrial use, OOP still rules the roost. And while Rust gets most of the benefits of OOP, they still don't have anything approximating inheritance, which just works too well for GUI development to give up on. Maybe Rust will address that in the future, but it's not there at the moment.

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

#39
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.

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

#40
post #22

Earlier quoted context omitted.

Are you implying that D is slow at compiling regular code but fast at compiling itself, because of some cleverness? Is that actually true?

Lol, the person you're replying to never said, nor implied that. I'm not trying to knock you, but your comment reminds me of the type of exchanges where one person says says "men do a lot of work", and the other person replies "are you saying women are lazy?"

> one-off tricks like compiling itself in 5 seconds.

I took that as saying D could compile itself in 5 seconds too. I was impressed. Bubble bursted.

Post reply on HN