9 November 2016
This post is a continuation of my posts discussing the topic of
associated type constructors (ATC) and higher-kinded types (HKT):
- The first post focused on introducing the basic idea of
ATC, as well as introducing some background material.
- The second post showed how we can use ATC to model HKT,
via the “family” pattern.
- The third post did some exploration into what it would
mean to support HKT directly in the language, instead of modeling
them via the family pattern.
- This post considers what it might mean if we had both ATC and HKT
in the language: in particular, whether those two concepts can be
unified, and at what cost.
Unifying HKT and ATC
So far we have seen “associated-type constructors” and “higher-kinded
types” as two distinct concepts. The question is, would it make sense
to try and unify these two, and what would that even mean?
read more →
4 November 2016
This post is a continuation of my posts discussing the topic of
associated type constructors (ATC) and higher-kinded types (HKT):
- The first post focused on introducing the basic idea of
ATC, as well as introducing some background material.
- The second post showed how we can use ATC to model HKT,
via the “family” pattern.
- This post dives into what it would mean to support HKT directly
in the language, instead of modeling them via the family pattern.
The story thus far (a quick recap)
In the previous posts, we had introduced a basic Collection trait
that used ATC to support an iterate() method:
read more →
3 November 2016
Hello. This post is a continuation of my posts discussing the topic of
associated type constructors (ATC) and higher-kinded types (HKT):
- The first post focused on introducing the basic idea of
ATC, as well as introducing some background material.
- This post talks about some apparent limitations of associated type
constructors, and shows how we can overcome them by making use of a
design pattern that I call “family traits”. Along the way, we
introduce the term higher-kinded type for the first time, and
show (informally) that family traits are equally general.
The limits of associated type constructors
OK, so in the last post we saw how we can use ATC to define a
Collection trait, and how to implement that trait for our sample
collection List<T>. In particular, ATC let us express the return
type of the iterator() method as Self::Iter<'iter>, so that we can
incorporate the lifetime 'iter of each particular iterator.
read more →
2 November 2016
So for the end of last week, I was at Rust Belt Rust. This was
awesome. And not only because the speakers and attendees at Rust Belt
Rust were awesome, though they were. But also because it gave aturon,
withoutboats, and I a chance to talk over a lot of stuff in person. We
covered a lot of territory and so I wanted to do a series of blog
posts trying to write down some of the things we were thinking so as
to get other people’s input.
read more →