Ruby's predicate (?) and bang (!) methods make code speak for itself:
empty? → returns boolean
sort! → mutates, danger ahead
vs:
isEmpty() → less expressive
sortInPlace() → verbose
Language design choices like this make Ruby a joy to write.
=> More informations about this toot | More toots from hopsoft@ruby.social
text/gemini
This content has been proxied by September (3851b).