3 ms·
Character escapes and string formatting (printf, String.Format in .NET) fall into this category as well. They’re weird little domain-specific sublanguages that
by evincarofautumn 9y ago
Character escapes and string formatting (printf, String.Format in .NET) fall into this category as well. They’re weird little domain-specific sublanguages that are entirely unlike their host languages, which people don’t even think of as DSLs because they’re so pervasive and (somewhat) consistent across languages.
- TeMPOraL 9y agoI'd throw in pattern matching, which is becoming popular thanks to functional programming.
- zem 9y agoyeah, i pointed out racket's `match` in a sibling comment, where they added it to the language as a dsl. works beautifully.
- TeMPOraL 9y agoLikewise, Common Lisp has a powerful matching DSL library too - Optima[0]. I also found a pretty new alternative, Trivia[1], which claims to be a drop-in replacement for Optima, but more extensible. -- [0] - https://github.com/m2ym/optima https://github.com/m2ym/optima [1] - https://github.com/guicho271828/trivia https://github.com/guicho271828/trivia