Mohammad Fallah
09/01/2025, 2:15 PMBox or similar. But this forces us to pass parameters down through three or four functions. The result is unnecessarily bloated function signatures. The real pain comes when you need to add a new parameter to the deepest composable — you end up modifying five or six functions just to thread that value all the way down.
My idea was to annotate the child’s parameter with @arg. A class would then be generated for that function’s arguments, which you could reference in its parent. The class would act only as a marker and get replaced by the actual parameter at compile time. (I’ve attached an image to illustrate this.)
Unfortunately, I gave up on the implementation. The compiler plugin API is poorly documented, and the solution felt fragile — I worried it might easily break with the next Kotlin release. So, I decided to share the concept instead. Maybe someone in the community with deeper knowledge of compiler internals can pick it up and turn it into something stable. (it's not the whole solution and there are more that I'll share if someone is interested)eygraber
09/01/2025, 5:16 PMMohammad Fallah
09/01/2025, 6:23 PMMohammad Fallah
09/01/2025, 8:12 PMtheapache64
09/01/2025, 9:04 PMMohammad Fallah
09/01/2025, 11:09 PMshikasd
09/02/2025, 10:39 AMshikasd
09/02/2025, 10:42 AMCLOVIS
09/03/2025, 10:02 AMdataarg proposal, but it's not on the roadmap yetMohammad Fallah
09/03/2025, 10:13 AMCLOVIS
09/03/2025, 12:03 PMMohammad Fallah
09/03/2025, 12:09 PMCLOVIS
09/03/2025, 12:17 PM