Re:Announcing Dart 2 Stable and the Dart Web Platform
by foldr on Tuesday August 07, 2018 @01:52PM
(#17708854)
You can do that if you change it to &Any and then downcast. See the docs for examples. If the issue is that you have to downcast, then your initial claim that Rust lacks void pointers was irrelevant even if true, since you also have to downcast a void pointer in C before you can perform operations on the type that it's actually pointing to.
[ Parent
| on HN ]
Re:Announcing Dart 2 Stable and the Dart Web Platform
by xfer on Tuesday August 07, 2018 @03:34PM
(#17709831)
You can't downcast it to anything you want, it returns an Option, void pointers in C are not certainly the same, it's unsafe.