Hacker News new | ask | show | jobs
by djur 909 days ago
What "special characters" are you talking about in Ruby? My impression is that Ruby and Python are roughly equivalent in terms of non-alphanumeric characters used in syntax.
2 comments

Some symbols I can think of that Ruby uses that python doesn’t: $ for global vars @ for instance vars :: for namespace stuff => for map key, value separator {||} for blocks .. and … for ranges %w for special array construction : for symbols ? and - in method names ?: for ternary expressions #{} for string interpolation

And python that Ruby doesn’t have: :: for slices @ for decorators

And for the symbols that they both share, subjectively, a lot of them are used for often in Ruby.

Ruby does have the block related stuff like the & argument and the single line block { }. But other than that I also think it's relatively similar to Python (which doesn't even support blocks anyway).