Andrew Gazelka
06/09/2019, 3:35 PMa,b,c,...,z
Let's say I have a complicated algorithm/function sequence which I want to break up into smaller unit testable functions. Each function takes a subset of config values and some calculated values (by previous parts by other functions)... this can get pretty annoying as each time I pass arguments into a function I have to pass in a ton. It would be nice if Java/Kotlin supported something like in TS where I can have an interface for some JSON and any JSON which had the proper fields and types would be allowed... this would allow for just passing in the entire config as an argument (or if I am unit testing passing in a subset of the config if needed). I am almost certain there is not a good solution to this in Kotlin/Java, but do you think there is one? I guess you could pass in a map as a parameter but this would not be compile-time type safe ... additionally, nested functions in Kotlin could be nice but the issue with them is that they are impossible to unit test. Thoughts?Shawn
06/09/2019, 6:20 PMAndrew Gazelka
06/09/2019, 6:21 PMAndrew Gazelka
06/09/2019, 6:21 PMAndrew Gazelka
06/09/2019, 6:21 PM