After creating a handful of functions for some task, some of which have generic parameters, I eventually call a ktor function
httpClient.get<T>(someUrl). But, in order for this to compile, the calling function must have a reified type param, which implies it must also be inline. Okay, no problem; but then that functions calling function must be inline with reified type param. And its calling function, and so on. To top it off, it also implies previously private functions can no longer be private if called by non-private functions, so my interfaces goes from
fun <T> A() fun <T> B() private fun <T> C()
inline fun <reified T> A() inline fun <reified T> B() inline fun <reified T> C()
Much less pretty, IMO. Is there no way to have syntactic sugar for this (automatic reification perhaps?), such that suddenly needing to call a fun with reified type param doesn’t necessitate changing every function in the hierarchy? It feels very non-user friendly in an otherwise very user friendly language.