News for hackers. Stuff that matters.
Re:Hindley-Milner Type Inference (2012) by ralfn on Friday July 10, 2020 @04:37PM (#23796162)
You might like the language Crystal, it works this way.

https://crystal-lang.org/

Re:Hindley-Milner Type Inference (2012) by chrisseaton on Friday July 10, 2020 @04:40PM (#23796191)
But Crystal recently had to walk back from global type inference as they found it was not realistic in practice, didn't they?
Re:Hindley-Milner Type Inference (2012) by gnulinux on Friday July 10, 2020 @05:32PM (#23796747)
Why is it not realistic? Is it too slow or too unreadable?
Re:Hindley-Milner Type Inference (2012) by chrisseaton on Friday July 10, 2020 @05:37PM (#23796812)
You could dig up the mailing list messages at the time, but yeah it was slow and I think it produced error messages that were extremely hard to use - it would decide the type of functions was something nonsensical and then report that as an error at all the call sites instead.
Re:Hindley-Milner Type Inference (2012) by gnulinux on Friday July 10, 2020 @05:54PM (#23796987)
Makes sense, bad errors is also why I don't use type inference in my code.