4 ms·
> Note, also, that on a Lisp-family language, creating a DSL is very easy. I'd argue that this is a bug, not a feature. Yes, DSLs can make for elegant code, bu
by cujic9 9y ago
> Note, also, that on a Lisp-family language, creating a DSL is very easy.
I'd argue that this is a bug, not a feature. Yes, DSLs can make for elegant code, but it comes at a high cost in the form of a hidden dependency: the state of the DSL author's brain.
In order for us to share a codebase with a DSL, I now need to understand your unique, high-level view of the problem, and be able to speak it fluently.
And if your view of the problem is incorrect, I need to be able to hold two conflicting viewpoints in my head and find a way to resolve them. (Something that humans find quite difficult.)
- argv_empty 9y agoA quick `s/DSL/library/g` and the result is just as true and just as much of an issue.
- cujic9 9y agoI disagree. A library works within the style and bounds of the base language. A DSL intends to re-define the base language and invent new keywords and a unique control flow.
- heavenlyblue 9y agoYes, and that is exactly what programmers do: they create hierarchies: we had started with assembly and now we've got easily-scalable-to-multiple-computers cloud platforms which also need to be programmed. God bless generations of programmers doing the same thing over and over again. It's funny how you can't even agree that there _might_ be languages that do allow you to create your own DSLs within the style of those languages; there _isn't_ a base language.
- JohnBooty 9y agoI don't agree at all. On a small project that utilizes a single DSL or a single library, sure, the difference is negligible. On a large project with many DSLs and/or libraries (ie Rails) it's not easy to tell if a given thing is part of Ruby or part of the many-headed beast that is Rails. (or which of those heads provided it...)