by tpush · 9y ago · 0 comments
Design-wise it's really just how my ideal language would work: functional, compiled, statically typed(higher-ranked, impredicative, but type-level functions are first-order, and no effects system), mutable refs that are _not_ GCed, first class delimited continuations, equi-recursive _and_ iso-recursive types, implemented in C so the compiler itself has a good performance baseline, etc...
It has been really fun so far and an amazing learning experience. I intentionally didn't read up on type theory, so implementing the type checker was a huge challenge.
Amazing feeling when I finally got it to (correctly) work, though :-).
I had an intuition of how parametric polymorphism worked because of my experience with Haskell, but I didn't know a type inference algorithm works, how that integrates with checking against an assumed type (and the whole unification shebang that comes with it); how universal quantification plays into that, the amount of pit falls that come with certain design decisions(impredicativity etc.).
I personally gain the most insight into something when I'm trying to think about it from first principles, so I avoided extensive research about type theory beforehand so that I wasn't "tainted" by preconceived ideas :-).
Of course I got stuck quite a few times. I would then look how Haskell does something and trying to understand why and how etc.