3 ms·
I'm increasingly suspicious of DSLs. Mostly I work in languages like Scala or Ruby with a syntax that's expressive enough for almost anything as it is and avoid
by cageface 16y ago
I'm increasingly suspicious of DSLs. Mostly I work in languages like Scala or Ruby with a syntax that's expressive enough for almost anything as it is and avoid building DSLs on top of them. You can cover a lot of ground in any language that allows higher order functions and function, sequence and hash literals.
Syntax matters but it seems to have become a bit of an obsession lately.
- statictype 16y agoDSLs aren't just about the curly braces and lambdas. It's also about reducing the amount of boilerplate code required to achieve some task. You can do this with higher order functions and objects but only to a certain extent. If you find that your language still requires boilerplate code to implement features in whatever domain you're working in, then perhaps it's time to get a new language - or write a DSL.
- cageface 16y agoAgreed, but I just don't find myself writing much boilerplate in modern languages. The other abstraction mechanisms take care of most of it.
- jules 16y agoThat's the problem with boilerplate. You don't see that it's boilerplate until you see a languages where it's unnecessary.
- khafra 16y agoIf that's true (and it seems likely) how can you avoid writing blub in lisp? How can you ever know to what extent you're writing blub in lisp?
- jules 16y agoYou mean writing blub-like code in Lisp? You probably cannot avoid that on your own unless your name is Guy Steele or someone like him, but by reading non-blub Lisp code you can.