DEV Community

Discussion on: How Lua Avoids Semicolons

Collapse
 
17cupsofcoffee profile image
Joe Clay

Overall, this is my preferred approach too! And it can work in imperative languages as well - Rust is my favourite example of this.

That said, I think it works a bit better in strongly typed languages than in dynamically typed languages - in the former case it's a lot easier for the compiler/interpreter to safeguard you from accidentally returning something when you didn't mean to.