3 ms·
Maybe it's just me, but I like doing it this way in Ruby: 100.times { puts "Ruby" } Not that there's anything wrong with your approach, but I just like the
by qwph 18y ago
Maybe it's just me, but I like doing it this way in Ruby:
100.times { puts "Ruby" }
Not that there's anything wrong with your approach, but I just like the way that my code reads almost like English.
- hugh 18y agoEleven characters! Beats Fortran by four. We have a winner! (Counting only the loop-related characters, leaving out whitespace.) Unless anyone has a shorter way of doing something one hundred times?
- davidw 18y agoI think if you want to talk about advantages though, with Fortran you're going to want to talk about the speed, not the brevity. Ruby is quite poky by comparison.