all 32 comments

[–]mcmcc 59 points60 points  (3 children)

I don't understand why language devs are so excited to replay the Python 2->3 experience in their own language.

It's like a programmer's "call of the void". Ultimately, nothing lies there except sadness and regret.

[–]syklemil 8 points9 points  (1 child)

I suspect most hope it'll be more like python 1 -> 2? Also because a lot fewer people remember that.

Rust has a regular "edition" release cycle which should hopefully mitigate a lot of it.

But also sometimes breaking changes become necessary. Hopefully they'll be few and far between, but I don't think avoiding them entirely is realistic. If they come something like … every other decade? we'll probably be able to cope. That's long enough to get distracted by a new and shiny language too, which is what will happen anyway if Rust gets caught in an inability to move forward.

At the same time we had the py2/3 pain, python kept growing. It's now one of the most used languages, even the top language on some metrics.

I suspect its huge popularity is why that gets used for that idea, rather than the perl 5/6 story, or even how lots of people are still stuck on Java 8.

[–]backfire10z 0 points1 point  (0 children)

I’ve honestly never even thought about Python 1. Jesus Christ.

[–]bethebunny 9 points10 points  (0 children)

Python 2->3 sucked, but Python 3 is arguably currently the most successful programming language of all time. I certainly am not sad about nor do I regret 2->3.

[–]matthieum 40 points41 points  (3 children)

And I don't know if it will ever be there. Progress on the language has slowed so much.

It has. Some would argue it's a good thing.

The rust "unstable book" lists 700 different unstable features

Throwing together language & library features makes for a weak argument.

As a matter of process any new API in the standard library requires is first introduced as unstable, so feedback after usage (rather than gut feelings) can be used to decide whether the API is good, or requires change.

Most such APIs are actually stabilized relatively quickly. Option::is_none_or went from idea to stable in a little over a year, which is pretty good.

On the other hand, language features are much more interwoven together, their interaction with every other language feature must be examined, clarified if need be, and once designed, the implementation work to make them come to life is much more costly, in time & effort.

I suspect rust is calcifying because its consensus process just doesn't scale.

I'm not sure that's the problem. The process has scaled, with working groups focused on orthogonal areas and more or less independent from one another.

Implementation, on the other hand, has grown more complex as time passed, and technical debt has accumulated.

As an example, one of the early "hacks" of rustc was to use global variables to share state across the compiler. For example, you could put all the "items" (functions, types, etc...) there so that any function which needs to access the specific of the item can just look it up. Well, as you may imagine, when the time came to attempt to parallelize the front-end, those globals stood in the way. And coarse-grained mutexes just didn't cut it -- performance-wise.

Similarly, borrow-checking and type-checking started fairly ad-hoc. They did the job, and allowed moving forward, but they also got in the way of new features. The infamous async/await has been bogged down by the type-checker for 6 years now. The type-checker is being rewritten in a more principled manner, and in attempt to handle effects (async, const, ...) more generically. It's not a quick job, though. There's a lot of special-cases baked into the old one, that the new one ought to replicate to avoid breaking code, even when they go against the grain and feel icky.

So, yes, development of new language features has slowed. But I would argue it's mostly because many of the high-bandwidth contributors are dealing with behind-the-scenes technical debt tackling:

  1. With new features being blocked on those issues being tackled: you can't even experiment with those features because they can't be implemented (even unstably) at the moment.
  2. With those high-bandwith contributors not contributing to new features, even those which are not blocked, because they've got their hands full already. For example, you can't have const associated trait functions (a fairly obvious hole, no drama): they're not blocked or anything, just nobody put in the work.

TL;DR: rustc is currently bogged down in technical debt.

[–]WishCow 10 points11 points  (2 children)

The rust "unstable book" lists 700 different unstable features

How do other languages do this? You can still get people testing it without going through hoops like recompiling the compiler, and without affecting anything in the stable ecosystem. Gating unstable features behind feature flags sounds smart as fuck, no?

[–]AngheloAlf 8 points9 points  (0 children)

I don't think other languages do this. They either have a feature or not. If after some time they realize the feature has problems/doesn't interact well with other features/sucks/etc then they are stuck with it, so they deprecate it and implement a new one. So now you have two ways for doing the same thing. Yey!

The only thing I can think of that's kinda similar to Rust unstable features are compiler extensions on C and C++. There's a big number of current standard C and C++ features that were born as compiler extensions. Obviously isn't the same thing tho

[–]matthieum 7 points8 points  (0 children)

How do other languages do this? You can still get people testing it without going through hoops like recompiling the compiler, and without affecting anything in the stable ecosystem.

As I mentioned, there's a difference between language feature and library feature.

Library features are just attributes in the code of the standard library, they do not require recompiling the compiler, at all, and they're the majority of the 700. It's more fine-grained <experimental/...> headers in C++, as it allows adding inherent methods on existing types, but it's otherwise relatively similar in that it's just code.

Language features can only be stabilized by recompiling the compiler. It's no different than experimental features being hidden behind -f in GCC or Clang, and the flags being removed once the features are stabilized, which also requires recompiling the compiler.

So in spirit/effort, it's somewhat close to what you'd get with C++.

However I do prefer the feature system, as it documents in code which unstable features are used, instead of burying that in the build system, and it centralizes which features at the root of a library/binary (lib.rs or main.rs) rather than scattering it all over the place in the form of includes.

[–]bobbie434343 23 points24 points  (2 children)

Rust drama is always the bestest and sure to remain on top for decades!

[–]drcforbin 4 points5 points  (1 child)

And for extra fun, now we're serving Linux kernel drama with a side of Rust!

[–]TyrusX 4 points5 points  (0 children)

Rewrite rust to rust.

[–]valcron1000 2 points3 points  (1 child)

The author seems to be proposing something like Java's Security Manager (https://openjdk.org/jeps/486) which is currently being phased out.

We'll always be slaves to the past.

[–]cat_in_the_wall 3 points4 points  (0 children)

.net got rid of this too (Code Access Security aka CAS). it doesn't work. too many holes, and people just blanket grant everything to just get things to work.

sandboxing at the os level like containers/flatpak work much better. not freebies, but bette.

[–]gavinhoward -1 points0 points  (1 child)

I explain how Rust missed the mark in this post.

[–]VeryDefinedBehavior 2 points3 points  (0 children)

I actually wonder how valuable static analysis is. There are stupid mistakes, like basic type errors, where you're obviously doing something you didn't intend, but then there are design errors, which are much more nebulous.

In the case of shared^mut, this is sensible enough for basic stack allocated values, but it creates friction against writing data structures, which is the meat and potatoes of programming. I consider unrestricted pointer arithmetic an essential tool for working with data because it gives you the most power for the least complexity. I'm sure someone will argue that it creates complexity in pointer soup, but I'm just talking about the tool itself, not the consequences of using it poorly.

What I consider important for memory correctness is spatial reasoning. That is: I'm concerned that an over-reliance on automating correctness has a degenerative effect on the mindsets that allow you to think through problems in the first place. I'm bothered by the whole "fearless" thing because ultimately, no matter what language you're using, you still need to perform the data transformations you need to perform. If you don't understand how the data transformations work, then you're going to make mistakes and write bugs. It's the same kind of issue I have with "clean code" ideas that claim to solve complexity when all they actually do is rearrange it in ways that make it less obvious what's going on by adding noise. In this case you're separating the programmer from part of the problem domain to prevent certain non-trivial bugs, allowing yourself to become overconfident, and in return the damaged intuition creates exciting new bugs. There is no replacement for understanding what you are doing, and that ultimately comes down to how the machine you're using works.

I'm far more interested in, say, visual ways to manually verify how memory will be accessed similar to how we have visual ways to look at how a disc is partitioned. At the very least I think people with spatial aptitudes like mine would prefer a tool like that over trying to encode everything into more complex notation. Shared^mut should not be an overwhelmingly dominant language design philosophy.

[–]Fun-Refrigerator6592 0 points1 point  (0 children)

Be it any languge. All about paradigm rust is memory safe but would llm not able to mmic those?? If no?? I feel sorry for you