2 ms·
As a developer who loves Ruby, the article (or possibly someone's comment above about making a mini-language around monads) reminded me of an excellent talk I h
by johncalvinyoung 8y ago
As a developer who loves Ruby, the article (or possibly someone's comment above about making a mini-language around monads) reminded me of an excellent talk I heard lately that implemented a DSL/object model for monads in Ruby, and refactored some moderately sticky problems to use them. Still didn't convince me that they were the One Holy Way to do my next project, but got it a whole lot closer to a tool in my toolbox.
I think the reasoning behind implementing these small languages on their own would be twofold: one, unless you're very careful, you end up with lots of context and approach and style inherited from your host language. You can write non-rubyish Ruby, but only to a degree...and anyone using it who's moderately familiar with the language is likely to break your artificial constraints. And for many of the programming concepts perhaps best demonstrated in isolation, they're divergent enough to be hard to implement well in a 'traditional' host language.