News for hackers. Stuff that matters.
Re:An Ode to Ruby by junoper on Monday January 10, 2022 @11:52AM (#29877645)
Python, I think, has n number of ways of doing the same thing while Ruby's everything is object approach forces you down a single approach. So while reading ruby code, you usually don't have to shift your mental model from OOP to procedural/list comprehension etc.

If Ruby gets a good machine learning library on par with something like Pytorch, I am sure many folks will shift to it and we might see new DSL emerge.

Re:An Ode to Ruby by regularfry on Monday January 10, 2022 @12:24PM (#29878175)
Which is ironic, given that "There should be one-- and preferably only one --obvious way to do it" is in PEP 20.
Re:An Ode to Ruby by burlesona on Monday January 10, 2022 @08:53PM (#29886170)
I agree. This has always driven me crazy. Python is supposed to be “there’s one way to do it” but I find it quite inconsistent!
Re:An Ode to Ruby by busterarm on Monday January 10, 2022 @01:58PM (#29879783)
The vast majority of Python code that I have had to interact with professionally seems to ignore the fact that PEP even exists.
Re:An Ode to Ruby by cutler on Monday January 10, 2022 @10:08PM (#29886898)
How I wish that was a possibility. Unfortunately Python's dominance of ML and AI is a fait accompli. If anything is going to replace Python in this domain it won't be another scripting language with similar performance.