Sam Stone09/27/2023, 2:48 PM
that uses code gen to create variables
, etc. (or
like in C#), based on the number of arguments passed in. Is this possible? Where would I begin? I have never made a compiler plugin.
ephemient09/27/2023, 6:29 PM
, etc.) for them to be passed around
if you want them all to have a "constructor" named
fun <T1, T2, T3, T4> Tuple(first: t1, second: t2, third: t3, fourth: t4): Tuple4 fun <T1, T2, T3, T4, T5> Tuple(first: t1, second: t2, third: t3, fourth: t4, fifth: t5): Tuple5 ...
etc. that are all backed by some internal
Tuple<T1, T2, T3, T4>
. dunno about it being worthwhile though, since unnamed tuples aren't an encouraged pattern in Kotlin
class TupleN(data: Array<Any>)
Sam Stone10/06/2023, 2:46 AM
aru10/10/2023, 11:25 AM
Sam Stone10/16/2023, 2:57 AM
only goes up to the 40's as of recent 2. The only way to do it that way is to have many nullable properties, so no type safety.