Ansh Tyagi
02/05/2022, 12:45 PMfun xyz(param1,param2,param3...)
and get something like {"param1":param1, "param2": param2 … }
its very laborious and redundant to do mapOf. Any workarounds?Joffrey
02/05/2022, 12:51 PMAnsh Tyagi
02/05/2022, 12:57 PMJavier
02/05/2022, 4:02 PMAnsh Tyagi
02/05/2022, 4:43 PMMykola Gurov
02/06/2022, 4:11 PMfun xyz(param1, param2, param3
you’d call fun xyz(XyzParams(param1="value1", param2="value2", param3="value3"))
etc. The Pro of this approach is that it’s usually a good practice to introduce such params for functions with lengthy signatures anyways. The Con is that this might be tedious and repetitive on itself.