4 ms·
Interestingly Scala 2.12 will have support for user defined types using function literals (it's actually in 2.11 behind a compiler flag). This feature is refer
by eeperson 12y ago
Interestingly Scala 2.12 will have support for user defined types using function literals (it's actually in 2.11 behind a compiler flag). This feature is referred SAM (single abstract method) functions [1].
Also, there are plans to move tuples to something more like HLists. You can see it here[2] as part of 3 under 'Don Giovanni'.
[1] - https://typesafe.com/blog/scala-211-has-arrived https://typesafe.com/blog/scala-211-has-arrived
[2] - http://www.scala-lang.org/news/roadmap-next http://www.scala-lang.org/news/roadmap-next
- lmm 12y agoYeah, I know about SAM support. But that will only happen if the type is known, and type-annotating every short {} is a pretty big price. Or can I do something like: myKleisli >=> {a => Option(a.toString)} and have SAM figure out that that's another Kleisli?
- eeperson 12y agoYeah, I think that would work. edit - I think the need for explicit types for each SAM was fixed by https://issues.scala-lang.org/browse/SI-8310 https://issues.scala-lang.org/browse/SI-8310