2 ms·
I've done some examples of transposing Java code explaining various design patterns from the GoF book to Haskell, then seeing how it gets simpler when you have
by drostie 10y ago
I've done some examples of transposing Java code explaining various design patterns from the GoF book to Haskell, then seeing how it gets simpler when you have a couple of higher-level ideas from Haskell to work with. It could make a fun talk to present at a Java-centric conference, "today I'm going to teach you some Haskell." As a bonus, you get to see how the Java code deals with a tremendous amount of needless complexity.
For example, here's what I've written so far for the Visitor pattern:
https://gist.github.com/drostie/818c54ca5c8182143699a72da98618bc https://gist.github.com/drostie/818c54ca5c8182143699a72da986...