3 ms·
The place where Ruby really wins is speed of development. Despite massive ecosystems and many libraries, Python, .Net and especially Java all lag Ruby in terms
by AlchemistCamp 7y ago
The place where Ruby really wins is speed of development. Despite massive ecosystems and many libraries, Python, .Net and especially Java all lag Ruby in terms of how long it takes to build a web app.
I'd say part of the reason is expressiveness of the language (since it's very easy to make DSLs with Ruby and Rails benefits greatly from them), but another part is cultural. Python, .Net and especially Java communities tend to suffer (and benefit!) from a strong emphasis on correctness and purity over speed and developer experience.
- philwelch 7y agoI'm not sure that Ruby is actually any faster or more expressive than Python. Having used both languages I consider them roughly equivalent.
- AlchemistCamp 7y agoCan you write DSL like the Rails router DSL in Python? If so, how much work is involved?
- philwelch 7y agoHaving a cute API and leaving the parentheses out of your function calls isn't a DSL, it's just a cute API where you leave the parentheses off. I know Ruby people call them "DSLs" all the time, but they aren't. Python doesn't have an idiomatic equivalent to block arguments, but you could probably write an equally usable routing API. It just wouldn't look as cute because there would still be parentheses. What you end up doing in e.g. Flask is decorating your controlle method with the path that routes to it. Turbogears controllers serve routes based on class and method names without the extra wiring that Rails has. Django has a Rails-style "URLconf" (https://docs.djangoproject.com/en/2.2/topics/http/urls/ https://docs.djangoproject.com/en/2.2/topics/http/urls/) that actually seems a lot more intuitive and explicit to me.