It's a great language.. and what makes it fun is the flexible nature of it..
I love the `x ||= 0` feature of the language, and miss it when working in elixir.
I also got to like the tailing if. `puts "hey" if x > 0`
Sometimes that things are pass by reference catches you buy surprise.
Now you can write efficient ruby, and structured algos too. The language isn't primarily used for this, but it can be done. Or rather one can easily write inefficient code. I've had a co-worker say "I don't write my code to be efficient." I (not liking the guy) replied. "It shows"..
Most times though (from a practical POV) I've found the code isn't the slow part of many apps; it's the data (database/file/api's). Still writing better ruby, with smart use of memoization and loops is a great boon.
I love the `x ||= 0` feature of the language, and miss it when working in elixir.
I also got to like the tailing if. `puts "hey" if x > 0`
Sometimes that things are pass by reference catches you buy surprise.
Now you can write efficient ruby, and structured algos too. The language isn't primarily used for this, but it can be done. Or rather one can easily write inefficient code. I've had a co-worker say "I don't write my code to be efficient." I (not liking the guy) replied. "It shows"..
Most times though (from a practical POV) I've found the code isn't the slow part of many apps; it's the data (database/file/api's). Still writing better ruby, with smart use of memoization and loops is a great boon.