|
|
|
|
|
by larsberg
5467 days ago
|
|
A lot has changed. If you're looking at other strongly-typed functional language, particularly if you don't have to handle laziness, Compiling with Continuations is a fantastic book (http://www.amazon.com/Compiling-Continuations-Andrew-W-Appel... ). There is still a lot that has changed since then. In particular: 1) Control-flow analysis has become much more well-understood, and there's a lot more you can do in your optimization phases to dramatically speed up code and reduce allocations (allocations and heap accesses are the bane of functional language implementation, btw. Unless you're Haskell, and then you also have to deal with mutation for shared lazy computation results). 2) Certain tricks such as monomorphisation (http://mlton.org/Monomorphise ) dramatically improve the ability of the compiler to generate optimized code from originally polymorphic inputs without paying huge representation overheads. Unfortunately, #1 and #2 are mainly written up "in the source" of modern functional language compilers or at best in JFP (Journal of Functional Programming) articles :-( But the Appel book provides most of the fundamentals you'll need to get bootstrapped with anything more modern, so I'd recommend it anyway! |
|
Something that I found interesting is that polymorthic types on .NET are also implemented with monomorphisation.