Great post! Ruby is my favorite language when it comes to syntax. Unfortunately, I work in a Java place :'( BTW the return keyword in Ruby is optional since Ruby will return whatever the result of the last statement in a method is implicitly. However, we can use return to end method execution early like in an edge case where we want to stop from completing the method. One last thing about return, it only affects methods, not blocks or lambdas so returning from a block or lambda will actually return the method that is calling the block or lambda itself.
Ruby is my favorite language when it comes to syntax. Unfortunately, I work in a Java place
I'm sure JRuby isn't going to fly but maybe you can find a compromise in Kotlin? I don't know much about it, I'm just mentioning it because it might provide you a happier experience while being able to keep your job :D
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great post! Ruby is my favorite language when it comes to syntax. Unfortunately, I work in a Java place :'( BTW the
return
keyword in Ruby is optional since Ruby will return whatever the result of the last statement in a method is implicitly. However, we can usereturn
to end method execution early like in an edge case where we want to stop from completing the method. One last thing aboutreturn
, it only affects methods, not blocks or lambdas so returning from a block or lambda will actually return the method that is calling the block or lambda itself.Return is optional ? Sweet ! Thanks!!
I'm sure JRuby isn't going to fly but maybe you can find a compromise in Kotlin? I don't know much about it, I'm just mentioning it because it might provide you a happier experience while being able to keep your job :D