Nikky
10/22/2019, 8:52 PMsuspend operator get(id: String)
and is there any way to use operator overloading with suspending functions ?louiscad
10/22/2019, 8:56 PMinvoke
operators for example, because it looks like a function call. I think I understand why the get
one can't suspend as it'd be a bit weird to have square brackets take a long time. get
operators is almost always used for in-memory structures like arrays, lists…Ilmir Usmanov [JB]
10/22/2019, 9:54 PMNikky
10/22/2019, 9:58 PMMatej Drobnič
10/23/2019, 5:13 AMsomeDataStructure[10]
I would expect 10th element to be retrieved immediately instead of performing asynchronous operation. someDataStructure.getAsynchronous(10)
would be more appropriate.Dico
10/23/2019, 10:29 AMIlmir Usmanov [JB]
10/23/2019, 10:30 AMsuspend
and some cannot. Ideally, all of them should be able to be suspend
.altavir
10/23/2019, 11:58 AM