Unification (2018)
28 points
2 hours ago
| 1 comment
| eli.thegreenplace.net
| HN
primitivesuave
1 hour ago
[-]
Brought back memories to over a decade ago with Mathematica. It's quite easy to pattern match simple expressions like:

``` expr = foo[bar[k], baz[V]]; expr /. foo[x_, baz[y_]] :> {x, y} ```

But in real-world use cases, this paradigm quickly exposes some unhandled edge cases, or cases where the evaluation becomes prohibitively expensive. Nowadays I use TypeScript, and this has ignited some curiosity into finding out if TS does anything to optimize for this in type inference.

reply
asplake
51 minutes ago
[-]
That’s kinda what brought unification to my attention. For my own education I’m writing a compiler for a simple ML-style language. Enjoying Pierce’s Types and Programming Languages meanwhile.
reply