Konstantin Petrukhnov
11/07/2019, 9:33 AMval cache = MutableMap<String, Any?>
where value could be String, Int, Map, Array, etc.
Then i retrieve values from it through the chain of functions, where caller is responsible to specify correct type.
cache[key] as R?
Question: what problems I may get with that approach? All of this code is internal to the module, and run on jvm/ios.karelpeeters
11/07/2019, 11:33 AMmolikuner
11/07/2019, 12:05 PMcache[key] as? R?
. That way wrong types would be ‘ignored’. The result would be null then.karelpeeters
11/07/2019, 12:06 PMKonstantin Petrukhnov
11/07/2019, 2:01 PMkarelpeeters
11/07/2019, 2:58 PM