> This included what was probably the most interesting part, writing the tricky recursive code to implement the match statement.
Back in school I found this book[0], "The Implementation of Functional Programming Languages". Flipping through it was very neat because it kinda demystified the nuts and bolts of implementing the "fancier" functional programming features for me.
Chapter 5 is about implementing pattern matching.
You read this kind of stuff and realize how easy things become when you just tackle a problem with the right mindset and abstractions. And this is a book from 1987! We've always had decent answers for a lot of the stuff.
I think it's interesting to flip through if you're a language implementer, though helps to be comfortable with reading some stuff sideways and not understanding every detail.
rtpg · · focus · HN ↗
Back in school I found this book[0], "The Implementation of Functional Programming Languages". Flipping through it was very neat because it kinda demystified the nuts and bolts of implementing the "fancier" functional programming features for me.
Chapter 5 is about implementing pattern matching.
You read this kind of stuff and realize how easy things become when you just tackle a problem with the right mindset and abstractions. And this is a book from 1987! We've always had decent answers for a lot of the stuff.
I think it's interesting to flip through if you're a language implementer, though helps to be comfortable with reading some stuff sideways and not understanding every detail.
[0] <a href="https://simon.peytonjones.org/assets/pdfs/slpj-book-1987-searchable.pdf" rel="nofollow">https://simon.peytonjones.org/assets/pdfs/slpj-book-1987-sea...
jan_m_savage · · focus · HN ↗
[dead]
vasco · · focus · HN ↗
jan_m_savage · · focus · HN ↗
vasco · · focus · HN ↗
jan_m_savage · · focus · HN ↗