4 ms·
What an interesting idea. Sort of, isolate out a graph of concepts from a language, and pull it out into its own language. I do wonder why the author believes
by bcherny 8y ago
What an interesting idea. Sort of, isolate out a graph of concepts from a language, and pull it out into its own language.
I do wonder why the author believes you need a separate language for this. Why not a DSL, or even a regular library in your popular language of choice (Scala, Haskell, JS, etc.).
Is that a reasonable approach too? Or is some part of the toy language approach lost without perfect domain-specific syntax, or because of parts of your host language leaking in?
- joppy 8y agoIsn’t a DSL a separate language? Libraries sometimes cannot do what new languages can, or can only mimic it in a very very cumbersome way, I think this is why the author advocates for separate languages, rather than libraries. The other thing that a separate language allows is for the author to remove every distraction that a host lanauge might have, and really streamline and emphasise the concepts they’re trying to show, and those concepts only.
- johncalvinyoung 8y agoAs 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.