DEV Community

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

Collapse
 
cescquintero profile image
Francisco Quintero 🇨🇴

I think it depends on the background. In my case, English is my second language and I learnt programming in Spanish. So when I see:

for (let counter = 1; counter <= 5; counter++) {
 console.log("This could be better.");
}
Enter fullscreen mode Exit fullscreen mode

I kind of read it literally: "define variable, control condition and make sure it's increased"

While with:

5.times do
  puts "something"
end
Enter fullscreen mode Exit fullscreen mode

I read as: "print something five times".

It's just like reading some text.

I don't want to mean disrespect to JS because I've worked with it and it's nice but I think Sylwia made a good point.