Konstantin Petrukhnov11/07/2019, 9:33 AM
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.
val cache = MutableMap<String, Any?>
Question: what problems I may get with that approach? All of this code is internal to the module, and run on jvm/ios.
cache[key] as R?
karelpeeters11/07/2019, 11:33 AM
molikuner11/07/2019, 12:05 PM
. That way wrong types would be ‘ignored’. The result would be null then.
cache[key] as? R?
karelpeeters11/07/2019, 12:06 PM
Konstantin Petrukhnov11/07/2019, 2:01 PM
karelpeeters11/07/2019, 2:58 PM