After reading Dyn you have idea for `dyn`? · baby steps and coming from managed languages I found that my requirements are usually very simple: I would like to move the Box
declaration to the declaration-site to take advantage of virtual dispatch, a unified base (e.g. object), allowing recursive types without affecting usage and paying the minimum cost by default (see anyhow
). Having a dedicated syntax for this would make a big difference.
I think that most effectively translates to a class
declaration (or maybe dyn struct
, dyn enum
) but I'm not sure how it could play out in the larger ecosystem of the language as currently established.