Setting aside all the Scala language features that are obviously a disaster the ability to nest method definitions is the worst Scala language feature.
-
-
Replying to @travisbrown
Aw, why? I really like that feature and use it all the time.
3 replies 0 retweets 10 likes -
Replying to @mpilquist @travisbrown
I also use it when I need a function in a local scope .. what's the issue with this feature ?
2 replies 0 retweets 1 like -
Replying to @debasishg @mpilquist
It muddies dependencies between chunks of logic—e.g.: def foo(a: A, b: B) = { val c = ... val d = ... ... def bar(z: Z) = { // do a bunch of stuff with any subset of a-z } }
5 replies 0 retweets 1 like
If you couldn't do that, wouldn't people just use this instead? val bar = (z: Z) => {... do a bunch of stuff with any subset of a-z ...}
8:09 AM - 12 Jun 2018
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.