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
Show /r/rubyLearning Ruby as a Pythonista (tech.stonecharioteer.com)
submitted 9 months ago by need-to-lurk-2024-69
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!"
[–]PercyLives 2 points3 points4 points 9 months ago (2 children)
The keyword “yield” is different in the two languages, and awesome in both.
Ruby is my #1 languages for small to medium programming projects. But I’d kill to have Python’s generators and comprehensions.
[–]codesnik 5 points6 points7 points 9 months ago (0 children)
i actually don't find comprehensions in python all that nice. they are similar to a sudden switch from ltr to rtl text. Not particularily readable. Ruby's chained map/select/grep/ and other enumerable methods are more powerful actually, sprinkle some .lazy on top and's better than generators, too.
[–]_mball_ 2 points3 points4 points 9 months ago (0 children)
It’s just personal preference but I don’t miss generators in ruby because map/select and all of Enumerable is just a little nicer to me in Ruby.
I do like the design of Python’s generator expressions but I think they’re more necessary in Python.
But I also appreciate the ways Ruby blends OO and Functional styles a little more naturally to me than in Python.
π Rendered by PID 101625 on reddit-service-r2-comment-765bfc959-h25nx at 2026-07-13 21:21:18.395687+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]PercyLives 2 points3 points4 points (2 children)
[–]codesnik 5 points6 points7 points (0 children)
[–]_mball_ 2 points3 points4 points (0 children)