Somewhat related to above, but has there ever been...
# language-proposals
n
Somewhat related to above, but has there ever been discussion of variadic generics in Kotlin? Even if it were done, say, only for inline functions, the same way that
reified
is. I think that would be super useful. That could allow simple tuples, and non-neutered implementations of things like zip, for example.
h
That feels like it would be another step in the C++-template direction from
inline reified
. I like C++ and I wouldn't mind variadic generics in Kotlin, but if there would appear a different way of doing meta-programming in the Kotlin language (and not in a Kotlin compiler plugin) I wouldn't mind that either.
n
I agree that C++ tends to abuse templates for metaprogramming, I just don't agree that a variadic generic function is metaprogramming 🙂 It's just a generic function. Just that it happens to be variadically generic.
h
🙂 OK, I agree with you that variadic generics isn't metaprogramming. Though I would like to have metaprogramming in Kotlin, and I wouldn't mind abusing variadic generics for that purpose 😈, being an evil C++-coder 😉
n
as a fellow C++ coder, I know what you mean 😉