zwarich at mozilla.com
Wed Jun 4 22:39:12 PDT 2014
There are at least two tricky aspects to adding GADTs in Rust:
1) Rust implements parametric polymorphism via monomorphization (duplicating polymorphic functions for each type), but GADTs are really only useful with polymorphic recursion, which requires a polymorphic function to be applied to a potentially unbounded number of types at runtime.
2) The interaction between GADTs and subtyping (e.g determining the variance of GADT constructors) is nontrivial.
> On Jun 4, 2014, at 8:33 AM, Suminda Dharmasena <sirinath at sakrio.com> wrote:
> It is great you have ADT but can you extend it to have GADTs?
> Rust-dev mailing list
> Rust-dev at mozilla.org
More information about the Rust-dev