MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1j1cw7/coffeescripts_scoping_is_madness/cbabfdk/?context=3
r/programming • u/donatj • Jul 25 '13
315 comments sorted by
View all comments
Show parent comment
4
In Haxe everything is an expression, but for/while/try have types Void so 'behave' like statements.
If you do want to have this behaviour for a for loop, array comprehension gives it by encasing the for loop in [] eg [for (i in 0...10) i*10]
View all comments
Show parent comment
4
u/moohoohoh Jul 25 '13 edited Jul 25 '13
In Haxe everything is an expression, but for/while/try have types Void so 'behave' like statements.
If you do want to have this behaviour for a for loop, array comprehension gives it by encasing the for loop in [] eg [for (i in 0...10) i*10]