Earlier quoted context omitted.
It's impossible to measure how much impact just having Rob Pike and Google behind Go has had on its adoption.
Google and Pike get you in the door. Goroutines get you to sit down. The onboarding-oriented nature of the language and ecosystem convince you to sign.
Ask HN: Why do you use Rust, when D is available?
201–210 of 262 posts
Re: Ask HN: Why do you use Rust, when D is available?
#202The 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.
In the tutorial, the language looks quite nice, comparable to Python. But in production level code, there are {.pragmas.} in a lot of places and they are not just advice for the compiler that can be ignored: they are important keywords that don't pollute the identifier space.
Another beef I had is that slice ranges and for loops are closed intervals by default. This is contrary to both Python and C, and while there is a syntax a..I wish Nim had a goal of being a typed, compiled Python. But I don't think that ever was a main goal and now it's sort of too late because the language has a very wide scope (my opinion) and has compatibility concerns with all of its previous design choices.
Re: Ask HN: Why do you use Rust, when D is available?
#203Earlier 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…
Re: Ask HN: Why do you use Rust, when D is available?
#204However it lacks the commitment of a proper roadmap and big corporate support, and that sadly damages its image.
Rust on the other hand, while quite relevant for bringing affine types into mainstream, still isn't what I would like to use across the various domains I work on.
Ironically, I see Java and .NET getting the missing features (AOT, low level unsafe code, better control over memory allocation) that will eventually allow me to use them in system level programming scenarios, where I would choose D today.
Re: Ask HN: Why do you use Rust, when D is available?
#205Personally, 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 has had Ada since 1983, Modula-2 since 1980, Object Pascal since 1990, and a couple of other ones, not counting all those Algol and PL/I variants that precede C for about 10 years.
Unfortunely the industry will only take security seriouly when security exploits are severly punishable by law.
Re: Ask HN: Why do you use Rust, when D is available?
#206Earlier 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…
React Native, the new Games SDK for Android, WinUI 3.0 release, lifetime analysis support for Visual C++ and clang and lets not forget they are two major contributors to ISO C++.
While the Rust/WinRT efforts from Kenny Kerr are welcomed, that it is just yet another option alongside C#/WinRT, C++/WinRT, Python/WinRT and JavaScript/WinRT.
Re: Ask HN: Why do you use Rust, when D is available?
#207Earlier quoted context omitted.
> 3. C++ and Rust will coexist for decades. Nah, I mean maybe in the way that Fortran coexist with C/C++ for decades, but it's not equal coexistence. I would rather say that new languages arise, replaces old ones for most scenarios and in the cases where they can't, due to various reasons, they push the old language into zombie state like cobol.
You don't replace languages but program's, go into physic-space, fortran is alive an well, go into systems programming c is alive an well, go into business java is alive and well. It's the same BS like NoSql will kill all R-D's. You just don't invest millions just to rewrite programs that work's perfectly (and that's often the case with old battle-hardened software)
Re: Ask HN: Why do you use Rust, when D is available?
#208Earlier quoted context omitted.
You don't replace languages but program's, go into physic-space, fortran is alive an well, go into systems programming c is alive an well, go into business java is alive and well. It's the same BS like NoSql will kill all R-D's. You just don't invest millions just to rewrite programs that work's perfectly (and that's often the case with old battle-hardened software)
The reason that RDMSes aren't dead isn't that they have too much momentum to be displaced by NoSQL. The reason they're not dead is that they're a good data model for lots of applications, and their consistency semantics and tooling provide real boosts to developer productivity.
Re: Ask HN: Why do you use Rust, when D is available?
#209Earlier 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…
>Rust found a ready audience in people intimidated by C++, frustrated with the limitations of C, Java, and Go, and ready to try something wholly new. What about people not intimidated by C++ and want to switch to Rust anyway? Why have you discounted them? Do such people exist in your world view? Do you think there might be a good reason for those people to choose Rust?
There are kludgy workarounds for everything, more or less, but why switch to a limited language with immature tooling and practically nonexistent immediate prospects, when C++ demand is going up, up, and up?
Memory safety is just not an issue at the level where coders of modern C++ work. I have had exactly one lifetime error in five years, caught in initial testing. My bugs are overwhelmingly specification omissions and logic mistakes that Rust suffers from exactly as much.
My day-to-day experience is to write 2000 lines and, when it compiles, it works correctly, modulo a "!" short or extra. Then, I spend a few days refining the design, which often means deleting code. Things Rust promises to help with consume only trivial attention. Library features not expressible in Rust prevent many more and bigger problems.
Rust has some nice qualities I would rather C++ had--pattern match support, simple iterators, default const and default pass-by-move, sane conversions, sane initialization--but they are all low-level conveniences, not anything I am willing to trade away architectura-level capabilities for.
Re: Ask HN: Why do you use Rust, when D is available?
#210Earlier quoted context omitted.
>Rust found a ready audience in people intimidated by C++, frustrated with the limitations of C, Java, and Go, and ready to try something wholly new. What about people not intimidated by C++ and want to switch to Rust anyway? Why have you discounted them? Do such people exist in your world view? Do you think there might be a good reason for those people to choose Rust?
If you are not intimidated by C++, you will be using those features that intimidate others to construct better libraries and programs than they can. Switching to Rust would mean a huge step down, where vast gaps in the feature set disable expressing what has been so easy. There are kludgy workarounds for everything, more or less, but why switch to a limited language with immature tooling and practically nonexistent i…