I implemented the Nimble type inference algorithm from Henry Baker's old Common Lisp paper in Clojure awhile back for #reasons. It's based on lattice/algebraic data flow (Kaplan-Ullman) rather than logical unification (Milner), and works well to calculate type specialization while compiling dynamic languages:

https://www.plover.com/misc/hbaker-archive/TInference.html

Yesterday I added a simple C generator to make something like Pre-Scheme <https://prescheme.org> for #Clojure

@jack wow, exactly what I was looking for today to implement in my compiler for a JS like dynamically typed language. Thanks! Do you think it would work my non-lisp language?
@abnv O, sure, the algorithm doesn’t care about syntax :)
@jack great. Thanks for posting it. I can't tell you how opputune it is for me.