we already have it on arrow-syntax
p
we already have it on arrow-syntax
c
From what I see, the approach was to have some plugin generate it for
Funtion0
..
Function22
?
I guess it means that it's not really convenient to define such functions without a plugin to create all subtilities of them :/
p
not really, no
without good metaprogramming this is what we have to resort to
@raulraja is working on a metaprogramming stack and has done some improvements already
r
The idea around arity abstraction is to come up with a syntax similar to vararg where you can pass N typed and it'd preserves the type information converting arguments to the notion of s type level TupleN
Then enable synt descriptors to all 22 version automatically and generate the currying or partial application of functions or any other data-types that suffer from this encoding to get functions only generated for the module usages unless you want to export the full DSL for 22 arities if you are working on a lib or consumers don't use meta and want to access the different typed arguments
Coming from a jar
s
Random question, why 22? Any reason behind that number?
r
Originally Scala had arity up to 22 only supported in certain things like case class parameters
👍 1
No other reason than inertia, we don’t have mapN22, just up to 10 I believe
I’ve been crunching my head for a couple of months already to see if we can abstract over arity in meta