Dyn* doesn't have to be special

TL;DR: I believe the storages API allows us to achieve the proposed benefits of dyn* in purely library code.


Follow up:

My library prototype using the storage API proposal is now complete enough to provide a prototype dyn* (with some limitations due to lack of compiler support).. I recommend reading the implementation's header comment if you're interested in dyn* like functionality; it assumes you know what the Storage trait is, but otherwise covers exactly what is done to provide a storage erased pointer in just 2×usize (and discusses larger solutions as well, along the way).


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.