r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
207 Upvotes

315 comments sorted by

View all comments

Show parent comment

2

u/mitsuhiko Jul 27 '13

I like rust's solution. The presence or absence of the semicolon after the last expression indicates weather the return value is the expression's result or nil. If the semicolon is left off the value is returned, otherwise the expression result is discarded.