4 ms·
Everything being a DSL is the worst part for me. Given Ruby's lack of static typing, every task becomes "how does this specific DSL work again...?". And when th
by trevor-e 3y ago
Everything being a DSL is the worst part for me. Given Ruby's lack of static typing, every task becomes "how does this specific DSL work again...?". And when there's a problem it can be non-obvious how to figure out what you did wrong. That said, once you learn the DSL I can totally see how it makes you ultra-productive.
I've been playing around with Ktor lately, and while a lot of it still depends on DSL's, it feels less magical and more like regular code, and I can easily step into the types/source of each DSL.
- toasterlovin 3y agoJust replace 'DSL' with 'API' in your comment and it describes using any large software framework. When you use on a framework to multiply your effort, you inevitably have to learn the ins and outs of the framework. In Ruby/Rails this is accomplished with a lot of class methods, but in other languages you would just be doing the same thing with instance methods or whatever.
- trevor-e 3y agoCorrect, but the key part I mentioned was "Given Ruby's lack of static typing". It's nearly impossible to hunt down source code in large Ruby projects due to mix-ins, dynamically adding methods to types, etc. At least in Ktor I've reasonably able to track down the implementations of most DSLs I've come across since it's statically typed. I tried the same in Rails long ago and gave up.
- SkyPuncher 3y ago> Everything being a DSL is the worst part for me. This is the worst part for me. Even though I've been using Rails for years, I still stumble on this.