News for hackers. Stuff that matters.
Re:Towards Scala 3 by lptk on Saturday April 21, 2018 @10:23AM (#16891520)
> Haskell's key innovation over ML was HKTs

In fact, ML modules have had higher-kinded types [1] since before Haskell even existed. I guess Haskell's main innovation in this domain is really its very convenient higher-kinded parametric polymorphism with type classes.

[1] MacQueen, D B (1984). Modules for Standard ML. Conference Record of the 1984 ACM Symposium on LISP and Functional Programming Languages. 198-207.

Re:Towards Scala 3 by YorkshireSeason on Thursday April 26, 2018 @06:49AM (#16930708)
Thanks. That's really interesting. I need to read MacQueen's paper. Is this full HKT, in the sense that all constructions wiht HKTs can be encoded in MacQueen's system?
Re:Towards Scala 3 by lptk on Monday April 30, 2018 @06:09AM (#16957273)
If by "all constructions wiht HKTs", you mean what can be done with HKTs in Haskell, then I'd say yes. It is well-known that ML modules provide a very advanced level of expressiveness, especially since OCaml's introduction of first-class modules. Also, Scala took this idea further and provides principled recursive first-class modules (which Scala calls dependent object types).

The problem is that modules in ML have a verbose syntax and are clunky to use compared to type classes. OCaml's modular implicits aim to make this better (see https://arxiv.org/abs/1512.01895), taking inspiration from Sala's implicits.

Re:Towards Scala 3 by YorkshireSeason on Thursday May 03, 2018 @01:47PM (#16988093)
I understand that making modules first-class gives them a lot of expressivity. But they are a fairly recent development" at least in OCaml the come much after Haskell. But are modules in MacQueen's sense first-class?