I totally forgot that you can comma-separate val assignments. var x = 0 val a, b = { x += 1; x } a = 1 b = 2
-
-
Replying to @djspiewak
@djspiewak yeah this surprises people roughly 100% of the time. Not convinced it's a feature.5 replies 0 retweets 0 likes -
Replying to @tpolecat
@tpolecat@djspiewak however, a lot of languages support it so it shouldn't' be totally surprising, but i ascribe it more to dynamic langs1 reply 0 retweets 0 likes -
Replying to @rit
@rit@djspiewak do they? With the repeat-eval behavior on the RHS?3 replies 0 retweets 0 likes -
Replying to @djspiewak
@djspiewak@tpolecat@rit Particularly useful when doing something like val x, y, z = buf.readInt3 replies 0 retweets 1 like
@djspiewak @tpolecat @rit *Only* particularly useful then, if I'm honest...
3:56 PM - 16 Sep 2014
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.