Implicit Returns and Expressions in Rust, Ruby, Kotlin and Scala

preview_player
Показать описание

This video explores the concept of implicit returns, if-expressions, match-expressions, and single-expression functions in programming languages like Rust, Ruby, Kotlin, and Scala, highlighting how they can enhance code readability and conciseness. The author demonstrates the use of these expression-based concepts and encourages readers to embrace the power of expressions in their code.
Рекомендации по теме
Комментарии
Автор

I landed here looking for comparisons between Ruby & Kotlin. I'm a Kotlin expert who is new to Ruby. I was surprised that a lot of tricks from Kotlin are available in Ruby, expressions being one of them. I like this style and it's how I program in Kotlin. If you add chaining, scoping functions, extension functions and the goal of eliminating local variables, you end up with code that reads like a spec and has a low chance of bugs. I'm hoping I can do that in Ruby. :)

cunparis