I am against language support for partials and cur...
# language-proposals
p
I am against language support for partials and currying. The code is less readable, there is nothing pragmatic about it and it increases the cognitive load ten-fold. Clojure/Scala have both, why not use it and leave Kotlin be?
a
Have you ever used currying/partials before?
n
The nice part about partials and currying is they are not required. They are functional idioms and the language technically supports them both currently. It just happens that currently it's so verbose it is killer.
r
I have always found currying very useful when it is available.
g
so verbose? Yes, library code with a lot of generics looks not so good, but from user point of view it’s easy to use and I really don’t see a big readon to support it on language level: Scala
Copy code
def add(x: Int)(y: Int): Int = { x + y }
vs (with funktionale)
Copy code
val add = {x: Int, y: Int -> x+ y}.curried()
and usage
Copy code
val addTen = add(10)_
//or
add(10)(2)
vs
Copy code
val addTen = add(10)
//or
add(10)(2)
I do not work with Scala, maybe I just don’t know about some use cases.