4 ms·
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 us
by djur 3y 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.
- ajanuary 3y agoSome 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.
- ric2b 3y agoRuby 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).