4 ms·
There is nothing wrong if you can justify it to the next programmer who has to deal with your code. If your gain is only marginal but I have to read and underst
by jlg23 11y ago
There is nothing wrong if you can justify it to the next programmer who has to deal with your code. If your gain is only marginal but I have to read and understand 200 lines of code to understand your DSL, I might be mildly annoyed....
- armitron 11y agoYou know there is such a thing as documentation right? If you have to read and understand 200 lines of code with no documentation, take it up with the incompetent developer. This argument holds no water whatsoever. Bad programmers can cause all sorts of damage, why should everything be dialed down to their level? Clojure forces you to deal with concurrency issues in a way that might be premature optimization at best, tremendous waste of time at worst. As opposed to DSLs in CL with reader macros, I have no choice in the matter, it's all or nothing. Yet I don't see you complaining. Good DSLs (meaning they map very well to the problem domain ) are irreplaceable. They can make a problem completely disappear.
- sklogic 11y agoA well-designed DSL should be self-documenting and obvious. And the right tools (like a proper IDE integration, with syntax highlighting and autocompletion) would make such a DSL much more obvious than a library of functions (which still must be thoroughly documented to be usable).
- zzalpha 11y agoA well-designed DSL should be self-documenting and obvious. ROFL. You're adorable. :) You're also conveniently ignoring the maintenance required on the DSL itself. DSLs are, themselves, code, and code must be tested, updated, will likely experience regressions, etc.
- sklogic 11y agoI've been building properly designed, syntactically rich DSLs for over a decade. It is much, much easier than building usable APIs. DSL compilers are the simplest and cleanest code possible. They're nothing but a chain of very trivial tree rewrites, and with a help of a proper DSL you can write and maintain them easily.