top | item 43396949

(no title)

datadeft | 11 months ago

Is it possible to have Hindley–Milner type system for a LISP?

discuss

order

tmtvl|11 months ago

I don't know what Hindley-Milner means, but maybe Coalton matches what you mean? <https://github.com/coalton-lang/coalton>

lou1306|11 months ago

It's static typing with inference. Essentially what you have in Haskell/OCaml/F# where you declare a variable `x` through a let-binding witout specifying its type (`let x = something`), and the compiler analyses `something` and infers the type of `x`.

rscho|11 months ago

Hackett. But the language is now abandoned.

sorawee|11 months ago

See also https://github.com/mflatt/shplait, which is a language with (1) the HM type system and (2) the same syntax that Rhombus uses. The language itself is implemented in Rhombus.

f1shy|11 months ago

Absolutely: you can make that with some macros and using type annotations. I do not know how difficult can it be, but surely there are thing already done.