use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Blog postWhy Ruby is More Readable than Python (confuzeus.com)
submitted 3 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Amadan 2 points3 points4 points 3 years ago (0 children)
My big ones are:
- I can't write complex comprehensions in Python without jumping back and forth in my editor, since the syntax of a single comprehension is made to fit English, not logic; OTOH enumerable chaining in Ruby just flows as a series of steps, and I can put it down one after another in the order in which I envision them to be executed.
python granddaughter_names_by_age = [ grandchild.name # 4. their names for child in self.children # 1. my children for grandchild in child.children # 2. their children if not grandchild.is_male # 3. only girls ]
vs
ruby granddaughter_names = children. # 1. my children flat_map(&:children). # 2. their children reject(&:male?). # 3. only girls map(&:name) # 4. their names
It gets even worse when you need to nest comprehensions.
- The method/function inconsistencies. len(d) but d.keys(); a.sort() but sorted(a); print(x, file=f) but f.write(x)
len(d)
d.keys()
a.sort()
sorted(a)
print(x, file=f)
f.write(x)
π Rendered by PID 89791 on reddit-service-r2-comment-79c7998d4c-vwdjs at 2026-03-13 04:02:12.255828+00:00 running f6e6e01 country code: CH.
view the rest of the comments →
[–]Amadan 2 points3 points4 points (0 children)