Thread overview
A diatribe on Rust
May 13, 2021
Paul Backus
May 13, 2021
Paulo Pinto
May 13, 2021
IGotD-
May 13, 2021
sighoya
May 13, 2021
sighoya
May 13, 2021
sighoya
May 13, 2021
Paul Backus
May 12, 2021
https://www.youtube.com/watch?v=ksTyCQwHGro&t=3317s

I wonder where D stands with regard to the author's various comparisons and contrasts between Rust and C++.
May 13, 2021

On Thursday, 13 May 2021 at 02:09:20 UTC, Andrei Alexandrescu wrote:

>

https://www.youtube.com/watch?v=ksTyCQwHGro&t=3317s

I wonder where D stands with regard to the author's various comparisons and contrasts between Rust and C++.

The substantive criticisms appear to be:

  1. Binary bloat
  2. Long compilation times
  3. Poor C interop
  4. Safety checking often fails to prevent bugs in practice (due to unsafe)
  5. General immaturity of tooling & ecosystem

D does much better at (3) and either a little or a lot better at (2) depending on how heavily you use templates. (1) and (4) are probably pretty similar. (5) is similar now, but Rust appears to be on a better trajectory.

May 13, 2021

On Thursday, 13 May 2021 at 02:24:51 UTC, Paul Backus wrote:

>

On Thursday, 13 May 2021 at 02:09:20 UTC, Andrei Alexandrescu wrote:

>

https://www.youtube.com/watch?v=ksTyCQwHGro&t=3317s

I wonder where D stands with regard to the author's various comparisons and contrasts between Rust and C++.

The substantive criticisms appear to be:

  1. Binary bloat
  2. Long compilation times
  3. Poor C interop
  4. Safety checking often fails to prevent bugs in practice (due to unsafe)
  5. General immaturity of tooling & ecosystem

D does much better at (3) and either a little or a lot better at (2) depending on how heavily you use templates. (1) and (4) are probably pretty similar. (5) is similar now, but Rust appears to be on a better trajectory.

Rust is definitely on a better trajectory.

https://security.googleblog.com/2021/04/rust-in-android-platform.html

https://blogs.windows.com/windowsdeveloper/2021/05/06/announcing-rust-for-windows-v0-9/

https://aws.amazon.com/blogs/opensource/innovating-with-rust/

https://security.googleblog.com/2021/04/rust-in-linux-kernel.html

https://engineering.fb.com/2021/04/29/developer-tools/rust/

Right now the best is to really fix the pending issues, instead of trying to compete with Rust, the language has hit jackpot with Linux kernel, Android and Windows support from the vendors themselves.

May 13, 2021

On Thursday, 13 May 2021 at 06:26:00 UTC, Paulo Pinto wrote:

>

Right now the best is to really fix the pending issues, instead of trying to compete with Rust, the language has hit jackpot with Linux kernel, Android and Windows support from the vendors themselves.

Yes, trying to compete with Rust or C++ is at this point a lost battle, D should play to its strengths (but be willing to change in areas that will make the ride smoother).

May 13, 2021
On Thursday, 13 May 2021 at 02:09:20 UTC, Andrei Alexandrescu wrote:
> https://www.youtube.com/watch?v=ksTyCQwHGro&t=3317s
>
> I wonder where D stands with regard to the author's various comparisons and contrasts between Rust and C++.

I agree with the author for most of the part. I predicted that more and more people would notice some of the inconveniences with Rust, and the popularity will plateau.

For some years ago I did an investigation what language was the best to replace some of my C++ code (both embedded and application code) and I found Rust to be too inconvenient. This eventually led me to D which seems to be the language that can do most what I was looking for and is as well kind of forgiving.

This also makes me want to warn the D maintainers not to try to shoe horn features that you find in Rust into D too quickly. Give it more time and see what features can stand the test of time in Rust, what was a fad and what was not. D has recently taken too much impression from Rust with @safe as default and borrow checker (which isn't a new memory management method). Something I don't care that much about.
May 13, 2021
On Thursday, 13 May 2021 at 11:01:31 UTC, IGotD- wrote:
> I agree with the author for most of the part. I predicted that more and more people would notice some of the inconveniences with Rust, and the popularity will plateau.

I don't know. Professional adoption is slow and comes with improved tooling. Go is a very boring language and has surprising adoption levels (for such an uninteresting language).

> This also makes me want to warn the D maintainers not to try to shoe horn features that you find in Rust into D too quickly. Give it more time and see what features can stand the test of time in Rust, what was a fad and what was not. D has recently taken too much impression from Rust with @safe as default and borrow checker (which isn't a new memory management method). Something I don't care that much about.

Yes, don't bring more tedium into the language profile. D needs to appeal to hobbyists and people who use it for personal projects, and adding stuff that is tedious will be very bad. Less tedium... is where D can have an edge (in this climate).

May 13, 2021
On Thursday, 13 May 2021 at 11:32:08 UTC, Ola Fosheim Grøstad wrote:

> I don't know. Professional adoption is slow and comes with improved tooling. Go is a very boring language and has surprising adoption levels (for such an uninteresting language).

Yes, but it is
1.) a simple language
2.) baked by a big company

The first point make it suitable for productive software development, the second offers many jobs for go developers.


May 13, 2021
On Thursday, 13 May 2021 at 11:01:31 UTC, IGotD- wrote:
> I agree with the author for most of the part. I predicted that more and more people would notice some of the inconveniences with Rust, and the popularity will plateau.

I hope so, it was too much hyped for my taste.
Just remembering on the trifecta they promised, safe, concurrent and fast and that all with ownership/borrowing.

The truth is however, that borrowing is too limited to achieve concurrency treating your program literally to cooperative exclusive threading only.

Therefore, RC and ARC must be used instead which on the other hand eventually lead to unsafe code.

It was also hyped that borrowing/ownership replaces GC, but what I see in most codebases is the use of RC structures, just because they are more convenient.


May 13, 2021
On Thursday, 13 May 2021 at 14:36:51 UTC, sighoya wrote:
> On Thursday, 13 May 2021 at 11:01:31 UTC, IGotD- wrote:
>> I agree with the author for most of the part. I predicted that more and more people would notice some of the inconveniences with Rust, and the popularity will plateau.

https://blog.darklang.com/why-dark-didnt-choose-rust/
May 13, 2021

On Thursday, 13 May 2021 at 14:38:24 UTC, sighoya wrote:

>

https://blog.darklang.com/why-dark-didnt-choose-rust/

One bit that particularly stood out to me:

>

I think most of us don't need Rust. I think Rust is a wonderful community, ecosystem, and tooling, wrapping a language that nicely solves a problem very few of us have. It's just so nice over there, until you actually write code.

It's easy to forget, given how nice everything is with the error messages and the docs, that Rust is a very low-level language. We're so attracted to the community and the tooling that we forget that low-level languages suck. Maybe Rust has a better story than most low-level languages, but remember that garbage collectors are great. By having a GC, we don't have to do any of the stuff that causes all these problems in Rust. Maybe that costs performance, but I need the ability to quickly write code a lot more than I need the extra performance.

A potential advantage of D, compared to Rust, is that while you can write low-level code in D, you're not forced to. So even if Rust is a better language for projects that are 100% low-level, D may be a better choice for projects that are mostly high-level, but need the ability to dip down into low-level code in specific places.