Scala annoyance #27: … match { case x if someExpensiveCalc(x) => someExpensiveCalc(x) + foo } Expensive redundancy. :-(
@jsuereth @djspiewak No. This would be broken. It is *not* an optimisation. You can do explicit sharing (val) only.
-
-
-
@djspiewak@jsuereth It is not an optimisation, it is a space/time trade that is not always optimal. See#haskell for this issue. - Show replies
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.