4 ms·
I'd go a step further, and suggest that most languages are able to embed some level of DSL, although you might not be able to reach quite the expressiveness tha
by MrJohz 3y ago
I'd go a step further, and suggest that most languages are able to embed some level of DSL, although you might not be able to reach quite the expressiveness that you had in mind.
Generally a combination of block closures and being able to chain methods together is usually enough to create something reasonably expressive, although even then there are alternatives - I've seen DSLs in Python that use the class syntax and metaclasses to define quite complex this. You won't be generating your own syntax or anything, but you can often get pretty far.