5 ms·
> But that other language also has a popular (and comparatively clumsy) web framework Django is today more elegant, more complete, and better documented than R
by p-e-w 4y ago
> But that other language also has a popular (and comparatively clumsy) web framework
Django is today more elegant, more complete, and better documented than Rails ever was. 10 years ago you would have been correct. 5 years ago they were about evenly matched. Today it's not even close. Python is eating the world, and web frameworks are no exception.
- capableweb 4y agoDjango might be better but Ruby as a language is way better thought out than Python. Python feels like it's cobbled together compared to Ruby. There is a certain elegance with the language, that is hard to find elsewhere.
- empthought 4y agoI disagree. I perceive no difference in elegance between the two languages nor a particular “cobbled together” aspect to Python.
- scotty79 4y agoMeta classes, dict/slot are some really inelegant stuff.
- empthought 4y agoI disagree. They are elegant.
- arcturus17 4y agoI use Python every day and I like it. However, functional semantics are not elegant at all IMO. Using list() and map() all over the place is not cool, and like many others say, list comprehensions, though concise, are not always that readable (and I say this as someone who reads and writes plenty of them). Lambdas are not great, either. In Django in particular, async feels like an afterthought, compared to other frameworks where it's first class.
- empthought 4y agoPython lambdas are not great but Ruby not having first-class functions is also not great. Neither are perfect and there is no syntactic reason outside of variations of personal taste to choose one language over the other. There are a boatload of compelling reasons to choose Python for its libraries and documentation and adoption level, though.
- arcturus17 4y agoI didn't know Ruby didn't have first-class functions but that's already a massive no for me. You don't need to convince me regarding Python though - it's too convenient to pass up. And despite its shortcomings it's certainly not a language devoid of elegance like some in this thread are painting... Like the old adage goes, there's the languages nobody uses, and there's the languages people talk shit about. Or in simpler terms, as seen in this thread: "everything I don't use is utter shit".
- djur 4y agoI have no idea what they mean by Ruby not having first-class functions. Of course it does. It's a fundamental feature of the language.
- empthought 4y agoNo it does not. Ruby has first-class procs. They are not the same thing. It's a fundamental flaw of the language. It's in the Wikipedia page. https://en.wikipedia.org/wiki/First-class_function https://en.wikipedia.org/wiki/First-class_function "The identifier of a regular "function" in Ruby (which is really a method) cannot be used as a value or passed. It must first be retrieved into a Method or Proc object to be used as first-class data. The syntax for calling such a function object differs from calling regular methods." Why do people like you insist on talking about things you don't actually know about?
- djur 4y ago
- arcturus17 4y agoI don't know anything about Rails but after having built a fairly large production web app with Django about a year ago, nothing about it felt cutting-edge to me: - Async support was second class back then, not obvious how to implement fully. - REST APIs are a library add-on instead of first-class. An excellent library, but still. - The package ecosystem sometimes reminded me of the wild-west that is Node.js - Dependency management is a complicated story (arguably caused by Python, rather than Django itself) - Django Models are cool and expressive, but nowadays I would rather express my models in something like a dataclass, or a Pydantic model, or just a regular class... Maybe Rails has these problems and more, I don't know. I'm not saying I'm never going to use Django again, but there's a large chance I will look elsewhere for a batteries-included framework next time I need one.