9 February 2018
So
aturon wrote this beautiful post about what a good week it has been.
In there, they wrote:
Breakthrough #2: @nikomatsakis had a eureka moment and figured out a
path to make specialization sound, while still supporting its most
important use cases (blog post forthcoming!). Again, this suddenly
puts specialization on the map for Rust Epoch 2018.
Sheesh I wish they hadn’t written that! Now the pressure is on. Well,
here goes nothing =).
read more →
24 October 2016
In my previous post, I talked about how we can separate out
specialization into two distinct concepts: reuse and override.
Doing so makes because the conditions that make reuse possible are
more stringent than those that make override possible. In this post,
I want to extend this idea to talk about a new rule for specialization
that allow overriding in more cases. These rules are a big enabler
for specialization, allowing it to accommodate many use cases that we
couldn’t handle before. In particular, they enable us to add blanket
impls like impl<T: Copy> Clone for T in a backwards compatible
fashion, though only under certain conditions.
read more →
29 September 2016
In my previous post, I started discussing the idea of
intersection impls, which are a possible extension to
specialization. I am specifically looking at the idea of
making it possible to add blanket impls to (e.g.) implement Clone
for any Copy type. We saw that intersection impls, while useful, do
not enable us to do this in a backwards compatible way.
Today I want to dive a bit deeper into specialization. We’ll see that
specialization actually couples together two things: refinement of
behavior and reuse of code. This is no accident, and its normally a
natural thing to do, but I’ll show that, in order to enable the kinds
of blanket impls I want, it’s important to be able to tease those
apart somewhat.
read more →
24 September 2016
As some of you are probably aware, on the nightly Rust builds, we
currently offer a feature called specialization, which was defined
in RFC 1210. The idea of specialization is to improve Rust’s
existing coherence rules to allow for overlap between impls, so long
as one of the overlapping impls can be considered more
specific. Specialization is hotly desired because it can enable
powerful optimizations, but also because it is an important component
for modeling object-oriented designs.
read more →