4 ms·
That reflects rather well how I feel about the recent DSL craze, specially in the ruby community. It's also how I feel about libraries and frameworks. Programm
by DarkWiiPlayer 8y ago
That reflects rather well how I feel about the recent DSL craze, specially in the ruby community. It's also how I feel about libraries and frameworks.
Programming languages probably suffer the least from this phenomenon due to how difficult it is to create a complete language, with compilers and all.
In contrast, languages that just extend others often do benefit from existing communities. Take moonscript¹ for example, it's just a new syntax for Lua, so you can use all the existing libraries at no cost. Or take Terra², which can make use of all the C libraries out there and the Lua libraries at the same time.
¹ http://moonscript.org/ http://moonscript.org/
² http://terralang.org/ http://terralang.org/
- flukus 8y agoIs the DSL craze really new? Look at a lot of the early history of unix and you'll see sh, sed, awk, tex and probably a heap of others that didn't survive. Not to mentions lex/yacc, two DSL's to make DSLs. The idea of specialized languages for specialized tasks has been around for decades.
- smadge 8y agoAn example that comes up often for me are EDSLs for database queries. I do see the value of them, but on the other hand it causes you to move away from a “lingua Franca” of database querying to a programming environment specific one. What probably makes sense is 1) evolving SQL or SQL tooling to support more features that people think they need (an example that comes to mind is type safe queries) and 2) better support for binding these queries to different languages.
- lmm 8y agoExternal DSLs (even with "cross-language bindings") are much worse to work with than than internal ones and SQL is no exception. IMO what's really needed is a willingness for databases to step away from SQL and expose an API that's more friendly to modern programming languages (or better yet, make the database embeddable as a library rather than a framework you have to build your application into). The eDSLs help a little, but as long as they're obliged to compile into SQL strings there's a limit to how effective they can be.
- vidarh 8y agoMost of "the DSL craze" in Ruby is just defining methods. It's rarely new languages, but simply a matter of taking full advantage of the language to let you talk about your domain in a more natural way. It's not so much a "dsl craze" in Ruby as writing idiomatic Ruby well, the same was as e.g. Smalltalk or lisps also tend to make you create your own vocabulary that is close to indistinguishable (more so than in Ruby, in fact, where the block syntax and control structure syntax differ) from the language itself.
- lassejansen 8y agoNot sure if "recent" is the correct attribute for DSLs in Ruby. https://www.infoq.com/news/2007/06/dsl-or-not https://www.infoq.com/news/2007/06/dsl-or-not