News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust by tormeh on Tuesday February 04, 2020 @07:34PM (#22242812)
D, Nim and Crystal all do very well on all metrics. Author finds Rust pretty close but not as maintainable. Interesting that the top 3 (performance close to C++, but more maintainable) all are niche languages that haven't really broken into the mainstream.
Re:Why Discord is switching from Go to Rust by corford on Tuesday February 04, 2020 @08:18PM (#22243096)
I really wish Intel or MS or someone would fund D so it could give Go and Rust a run for their money. It's as fast (or faster), expressive, powerful and, subjectively, easier to pick up and code in than Rust. It just needs some backers with muscle.
Re:Why Discord is switching from Go to Rust by nnq on Wednesday February 05, 2020 @02:18AM (#22244695)
You probably have Swift in the same niche... and more elegant, not completely ignoring the last few decades of language research etc. If you want something more minimalistic there's Zig. D is just "C++ + hindsight", nothing special, only extra fragmentation of dev ecosystem by bringing in another language.

Ofc, Apple is not MS, so Swift developer experience and docs kind of suck (if you're not in the "iOS bubble" where it's nice and friendly), and multiplatform dev experience especially sucks even worse...

And "easier to pick up and code in" might not necessarily be an advantage for a systems language - better start slowly putting the puzzle together in your head, and start banging up code others need to see only after you've internalized the language and its advanced features and when (not) to use them! It helps everyone in the long run. This is one reason why I'd bet on Rust!

Re:Why Discord is switching from Go to Rust by wool_gather on Wednesday February 05, 2020 @11:38AM (#22248415)
"completely ignoring the last few decades"

Well, for fairness, D is quite a bit older than Swift. (It's nearly as much older than Swift as it is younger than C++!) But what do you think pushes Swift out of the "C++ with hindsight" basket?

Re:Why Discord is switching from Go to Rust by jholman on Tuesday February 04, 2020 @11:44PM (#22244096)
Maybe some big FAANG company. Start at the beginning of the acronym, I guess. I wonder if anyone could persuade anyone at Facebook to do a little bit of D professionally. I bet if even one serious Facebook engineer made a serious effort to use D, its adoption woes would be over.
Re:Why Discord is switching from Go to Rust by sophiebits on Wednesday February 05, 2020 @02:17AM (#22244691)
Facebook is unlikely to move to D at this point and already has multiple serious projects in Rust (that they’re happy about, AFAIK).
Re:Why Discord is switching from Go to Rust by vips7L on Wednesday February 05, 2020 @12:22AM (#22244271)
Walter Bright the author of D worked at Facebook writing a fast preprocessor for C/C++ in D.
Re:Why Discord is switching from Go to Rust by jholman on Wednesday February 05, 2020 @12:26AM (#22244287)
Alexandrescu, too.

They also talked about it pretty frequently.

Maybe ggp's claim that D just needs a heavy hitter backing it might be misplaced.

Re:Why Discord is switching from Go to Rust by vips7L on Wednesday February 05, 2020 @01:46PM (#22249836)
I don't think it's misplaced. Facebook wasn't really backing D by hiring them. And it doesn't seem like that specific project is active anymore.
Re:Why Discord is switching from Go to Rust by dom96 on Wednesday February 05, 2020 @04:48AM (#22245405)
Walter too? AFAIK it was just Andrei.
Re:Why Discord is switching from Go to Rust by Cyph0n on Wednesday February 05, 2020 @12:23AM (#22244274)
I thought Facebook used to “unofficially” support D? Or am I mixing languages up?

Right now, I think eBay is one of the big companies that uses D.

Edit: Sibling comment beat me to it.

Re:Why Discord is switching from Go to Rust by pjmlp on Wednesday February 05, 2020 @09:47AM (#22247058)
That is what MS is doing with C#/F# and .NET Native/Xamarin AOT/CoreRT, with the experience taken from Midori.

So I doubt they would sponsor D.

Re:Why Discord is switching from Go to Rust by marcosdumay on Wednesday February 05, 2020 @12:30PM (#22249039)
C# is an attempt of making Java good, F# is an attempt of making a subset of Haskell popular. .Net Native/Xamarin/CoreRT are UI frameworks. There is nothing there that would compete with C++.

I don't think MS has any interest in improving C++ (look at their compiler). But that's not because of competing activities.

Re:Why Discord is switching from Go to Rust by pjmlp on Wednesday February 05, 2020 @02:02PM (#22249978)
Except the lessons learned from Midori and .NET Native on UWP.

Visual C++ is the best commercial implementation of C++ compilers, better not be caught using xlc, aCC, TI, IAR, icc and plenty of other commercial offerings.

If C++ has span, span_view, modules, co-routines, core guidelines, lifetime profile static analyser, is it in large part to work started and heavily contributed by Microsoft on ISO, and their collaboration with Google.

As for competing with C++, it is quite clear, specially when comparing the actual software development landscape with the 90's, that C++ has lost the app development war.

Nowadays across all major consumer OSes it has been relegated to the drivers and low level OS services layer like visual compositor, graphics engine, GPGPU binding libraries.

Ironically, from those mainstream OSes, Microsoft is the only one that still cares to provide two UI frameworks directly callable from C++.

Which most Windows devs end up ignoring in favour of the .NET bindings, as Kenny Kerr mentions in one of his talks/blog posts.

Back to the D issue, Azure IoT makes use of C# and Rust, and there is Verona at MSR as well, so as much I would like to see them spend some effort on D, I don't see it happening.

Re:Why Discord is switching from Go to Rust by Kuinox on Wednesday February 05, 2020 @02:53PM (#22250405)
CoreRT is an UI frameworks, what ?
Re:Why Discord is switching from Go to Rust by systems on Tuesday February 04, 2020 @09:27PM (#22243445)
I strongly believe, that people should consider the ecosystem part of maintainability risk and claim

Rust have by far the better ecosystem compared to those 3

Re:Why Discord is switching from Go to Rust by no_wizard on Wednesday February 05, 2020 @12:00AM (#22244165)
That’s highly subjective claim to bare without evidence. All three languages are actively maintained and are growing.

My refute it simply: Rusts web development story isn’t out of the box clean like Crystal Lang’s which ships with an HTML language out of the box. So it could be categorized as a poor choice in comparison to Crystal

Re:Why Discord is switching from Go to Rust by nindalf on Wednesday February 05, 2020 @05:27AM (#22245570)
> ships with an HTML language

Did you mean HTTP server? If so, there are at least 3 good ones in Rust that are only a `cargo add` away. If you've already taken the trouble to set up a toolchain for a new language, surely a single line isn't asking too much.

Re:Why Discord is switching from Go to Rust by marcosdumay on Tuesday February 04, 2020 @07:52PM (#22242948)
Rust won't get a maintainability prize for short programs with simple algorithms.

It's Haskell-like features only help on large and complex programs.

Re:Why Discord is switching from Go to Rust by vnorilo on Tuesday February 04, 2020 @08:27PM (#22243142)
They do help library writers, and therefore turn large and complex programs into shorter programs.