News for hackers. Stuff that matters.
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.
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.
Re:Announcing Dart 2 Stable and the Dart Web Platform by foldr on Tuesday August 07, 2018 @03:49PM (#17709992)
I know. That's why I said it's "a safe analogue of casting a void pointer to another type".
Re:Announcing Dart 2 Stable and the Dart Web Platform by EugeneOZ on Tuesday August 07, 2018 @02:54PM (#17709466)
> If the issue is that you have to downcast

It's the difference between dynamic language and language with synthetic type for reflections.