Why isn't trait specialization a higher priority for Rust development?

From reviewing #31844, it appears that there has been little progress on trait specialization, even though implementing this feature could unlock numerous use cases in scientific computing. With trait specialization, it would be possible to build something conceptually similar to static multiple dispatch, which - as demonstrated by the Julia language - enables significant reusability for scientific computing libraries.

The "always applicable impl" concept discussed in #48538 seems to address the unsoundness issue without imposing a significant penalty on the expressivity of trait specialization. This suggests that there may not be insurmountable technical barriers to implementing the feature.

Is this just a matter of priorities? Does the Rust project not currently aim to appeal to a broader scientific computing audience? Or are there other considerations at play? Could anyone provide insights into why specialization is not being prioritized? Are there specific technical blockers, or is the delay more about aligning the feature with Rust's overall design philosophy?

You might get better answers if you ask this on IRLO— More compiler developers hang out there than here.

I think that everyone involved is being extra cautious with this one because specialization has gone through a few design iterations now that looked like they would solve the soundness issues but ultimately turned out to be flawed. This one looks like it could be the answer, but so did all of the others when they were proposed.

3 Likes

You may be interested in this current thread on the same topic.

1 Like

Just to be clear, this is what I mean by code reuse via static multiple dispatch.
Here is more details on how multiple dispatch enables code reusability.

Let others know when you cross post.

1 Like

I think OP was following the advice of @2e71828 to redirect this question to IRLO.

3 Likes

The idea is just to give everyone a link and a signal that posting elswhere did actually happen.

2 Likes

Right, I'm not saying don't cross-post; I'm saying let people know when you do cross-post so they can avoid duplicate effort.

2 Likes