Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While that may be true, I'm not sure that's evidence that DSL's are the reason. I would argue the explanation is: JavaScript. I think many people are compelled by the idea that you can learn one language, and handle both back and front-end development. As the language has improved over the past ~10 years, this angle has only become more compelling, and has eaten into the popularity of other "traditional" web frameworks like Django, Rails, Spring, etc.


I myself am one of these people. But even if Ruby worked anywhere and I could share all my code, I would still prefer TypeScript because of its support for typed JSX and excellent typing system overall. The IDE can help me in most cases, while it stays silent a lot with Ruby. I just don't see what more Ruby offers - and I'm saying that as someone who really likes OOP and really wanted to like Ruby.


I think JavaScript benefits from typing a lot more than Ruby does. Ruby is at least strongly typed, so doing something like `[] + {}` or `4 + {foo: "bar"}` will raise an exception instead of return you a seemingly-arbitrary value.

As far as what Ruby offers over JavaScript? It's a bit personal preference, but I prefer Ruby for several reasons:

- More stable ecosystem. There are more canonical "best" tools for the job. There's one dominant web framework, one dominant background job processor, one dominant task runner, debugger, testing framework, etc.

- More robust standard library. Enumerable rocks. And rolls.

- Better fits "OO" definitions—everything is an object in Ruby. It supports public/private/protected instance methods/variables.


I was about to say as well, JavaScript, SQL, were both niche DSLs that are now mainstream enough that people prep them for general software development interviews.

JavaScript is now a general language, but maybe the most popular DSLs break out of that once they've gained a certain mindshare, at which point they're no longer a DSL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: