Scala annoyance #27: … match { case x if someExpensiveCalc(x) => someExpensiveCalc(x) + foo } Expensive redundancy. :-(
@djspiewak @jsuereth It is not an optimisation, it is a space/time trade that is not always optimal. See #haskell for this issue.
-
-
-
@djspiewak@jsuereth that does not make it optimal.
End of conversation
New conversation -
-
-
-
@djspiewak@jsuereth yes sharing, not memoisation, which would be a bug.
End of conversation
New conversation -
-
-
@dibblego@djspiewak@jsuereth cause it can cause mem leaks in the worst case right? -
@cartazio@djspiewak@jsuereth Yes; follow this reasoning and you'll use more memory than we all own together.
End of conversation
New conversation -
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.