In no place is it written in stone that to be a Lisp, it must not use Hindley-Milner type inference.
hindley-milner
How to use hindley-milner in a sentence. Live example sentences for hindley-milner pulled from indexed public discussions.
Editorial note
In no place is it written in stone that to be a Lisp, it must not use Hindley-Milner type inference.
Quick take
In no place is it written in stone that to be a Lisp, it must not use Hindley-Milner type inference.
Example sentences
I think the problem is that Hindley-Milner type inference doesn't play with OO type hierarchies, and so Java interop (which is a key motivating purpose of Scala) means worse inference than ML-family langs for Scala.
When I deal with generic code, this difficulty is largely attributable to the differences between Hindley-Milner and templates.
We are also working on a very different kind of type inference, unlike Hindley-Milner.
Considering how functional JS tends to be, I suspect that something based on Hindley-Milner inference could be a great match.
Adding a Hindley-Milner-like type-inference to a language that has subtype polymorphism and method overloading is really not a good idea (or possible for that matter).
I speak this from my own memories about fiddling with a Hindley-Milner inference implementation.
You can implement Hindley-Milner type inference in Python.
Hindley-Milner type systems like Haskell often don't allow dependent types, which means that a 2D vector and 3D vector are the same type unless their dimensions are known at compile-time (which is oftentimes not the case).
Hindley-Milner type systems like Haskell often don't allow dependent types[1], which means that a 2D vector and 3D vector are the same type unless their dimensions are known at compile-time (which is oftentimes not the case).
It looks like _sketching_ is more analogous to using Hindley-Milner for filling in gaps in an executable spec, where as Programming by Example infers code from data (examples).
I think the following alternative is more appealing: stick with lightweight types (think Hindley-Milner), and leave reasoning to an external calculus (variants of Hoare logic).
Quote examples
There are probably some hard trade-offs between expressivity of types and efficient decidability of type inference (B Pierce termed Hindley-Milner a "sweet spot"), so we might have to tolerate some type annotation being required, e.g.
The "go generate" is a small step into the direction this will take, IMO Static code generation is what people tried before templates, which were then improved upon by generics, and that's only looking at mainstream languages--if you're willing to look outside that, there's Hindley-Milner type inference and typeclasses.
Frequently asked questions
Short answers drawn from the clearest meanings and examples for this word.
How do you use hindley-milner in a sentence?
In no place is it written in stone that to be a Lisp, it must not use Hindley-Milner type inference.