The Scala for comprehension curly brace + yield syntax finally makes sense to me. I'm slow.
-
-
Replying to @chadfowler
@chadfowler I almost always prefer just using map/filter/flatMap directly. Feels more like Ruby (related: Ruby needs flatMap).5 replies 0 retweets 1 like -
Replying to @avibryant
@avibryant I think I would too but it's always bothered me how dissonance the syntax feels3 replies 0 retweets 0 likes -
Replying to @chadfowler
@chadfowler the for syntax also can make sense as an analog to Haskell's do notation; it's sugar for monads.3 replies 0 retweets 0 likes -
Replying to @avibryant
@avibryant@chadfowler it’s somewhat disappointing to me that it doesn’t more closely follow do-notation.1 reply 0 retweets 0 likes -
Replying to @mf
@mf@chadfowler it's pretty similar, isn't it? It differs mainly in requiring the yield at the end. It even carries over the <- notation.1 reply 0 retweets 0 likes -
Replying to @avibryant
@avibryant@chadfowler yeah, it’s almost there, though what it desugars to leaves much to be desired. :/1 reply 0 retweets 0 likes
@mf @chadfowler I prefer to celebrate how far Scala has dragged Java towards (Haskell|Ruby), not lament how far it still has to go.
-
-
Replying to @avibryant
@avibryant@chadfowler well said. I’ve been pretty happy with it overall.0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.