The Scala for comprehension curly brace + yield syntax finally makes sense to me. I'm slow.
@chadfowler the for syntax also can make sense as an analog to Haskell's do notation; it's sugar for monads.
-
-
@avibryant it really was just my perception of the scope given the curly braces. without the curly braces it makes sense. -
@chadfowler@avibryant is a Smalltalk guy. Curly braces are the enemy!
End of conversation
New conversation -
-
-
@avibryant@chadfowler it’s somewhat disappointing to me that it doesn’t more closely follow do-notation. -
@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. -
@avibryant@chadfowler yeah, it’s almost there, though what it desugars to leaves much to be desired. :/ -
@mf@chadfowler I prefer to celebrate how far Scala has dragged Java towards (Haskell|Ruby), not lament how far it still has to go. -
@avibryant@chadfowler well said. I’ve been pretty happy with it overall.
End of conversation
New conversation -
-
-
@avibryant@chadfowler also, beware of pattern matching on the lhs of the arrow.Thanks. 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.