DEV Community

Discussion on: Why do you love Ruby, actually? An ode.

Collapse
 
emanuelhfarias profile image
Emanuel H. Farias • Edited
def adult?
  age >= 18
end
Enter fullscreen mode Exit fullscreen mode

Simplicity, just the necessary words to be easy to read.

No return keyword.
No self.age to access instance attributes/methods.
No weird method names (like isAdult).

Trying to do the same in other languages seems that I'm writing unnecessary symbols.

Collapse
 
sylwiavargas profile image
Sylwia Vargas

Ruby is so readable and clean 💖
Thank you for this example, it is something everyone can understand from the get-go.