Live data from Hacker News

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

news.ycombinator.com

131–140 of 262 posts

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

#131
post #101

Earlier quoted context omitted.

> Why would you throw all of that overboard Firstly, because 75% of all that knowledge is easily transferrable. Secondly, because you want to take 50% of your bug count.

But why not program in Python and take 100% of your bug count?

It is slow.

It doesn’t work well for embedded programming.

It very much does not fix all bugs, especially given lack of static type checking.

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

#133
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 got scared away by rust's syntax. I feel that people can learn rust faster if they know c++ beforehand. c++'s syntax is scary too. But there are different levels of c++. You don't need to use the scary part to make things work.

Disagree. Sure rust has a notable syntax tax (not what it used to be) but that's the easy part! It's the concepts and mindset that are the biggest hurdle in Rust. Going to C++ first won't help you there. If you already know it, great but Rust is a different language and you'll spend a lot time trying to transfer C++isms over until you realize writing effective Rust is not like writing effective C++ and you go through a process of unlearning. In my view, learning C++ for the purpose of learning Rust is massive waste of time.

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

#134

Earlier quoted context omitted.

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.

Then I recommend https://www.jsoftware.com/help/jforc/contents.htm

Thank you! I just bookmarked it.

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

#135
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 got scared away by rust's syntax. I feel that people can learn rust faster if they know c++ beforehand. c++'s syntax is scary too. But there are different levels of c++. You don't need to use the scary part to make things work.

> I got scared away by rust’s syntax.

I’m curious about what you find scary about Rust’s syntax. I always found it to be a fairly natural extension of the syntax from C and other ALGOL-derived languages.

Its semantics, on the other hand, took quite a while to wrap my head around. I am reasonably productive in Rust these days, and I still sometimes can’t predict whether or not the compiler will allow something.

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

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

Really? I find that rust is worse than C++ thanks to clang

For example, is there a way in rust to get a runtime error when there's an int overflow?

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

#137

Earlier quoted context omitted.

Possibly nim as well. But We should be able to provide interop between llvm and gcc so they can all cross pollinate in some way? Not saying it’s easy, nor that I have the skills to do it, but we should be able to build across boundaries and stop soloing so much?

I don’t hear much about Nim. Will this language ever take off? It seems this language needs a large corporation backing it, to get a chance to succeed.

Nim's compiler was full of bugs and would crash on trivial programs for a long time. It also has garbage collection so ends up in a different niche.

Just like Zig not parsing tabs or carriage returns or V being broken on windows and never fixed, I don't think it is corporate sponsorship that is the problem, but more basic utility.

Plenty of people are trying these new languages, the demand is there, but there is usually some huge blind spot that they don't deal with until it is too late and they have already burned a lot of people that gave them their attention.

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

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

Really? I find that rust is worse than C++ thanks to clang For example, is there a way in rust to get a runtime error when there's an int overflow?

Yes there is. Overflow panics by default in debug mode, and you can turn that in in release mode with the overflow-checks compiler option. There's also checked_add.

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

#139

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.

> But why does everyone want c++? Few "want" C++, but for robotics a non garbage-collected language is necessary so latency is predictable. There are few mature languages besides C/C++ in that category. Rust is an improvement, but I'm hopeful something like Julia (Julia Robotics, https://juliarobotics.org/ ) or Scala Native ( https://scala-native.readthedocs.io/en/v0.3.9-docs/ ) becomes mainstream, the productivity g…

For some reason Python seems to be very popular in academic robotics right now. Not a great choice

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

#140
post #101

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.

> Why would you throw all of that overboard Firstly, because 75% of all that knowledge is easily transferrable. Secondly, because you want to take 50% of your bug count.

He was saying this in the context of "why do people still use C++ at all".
Post reply on HN