A full-time #Rust #developer and a #student.

I love #rendering & #gamedev, tabletop #RPG s like #DnD, #biohacking & #transhumanism.

Btw, I’m an #Arch #Linux user, a #vegan, and I already said I do #programming in Rust.

  • 0 Posts
  • 2 Comments
Joined 2Y ago
cake
Cake day: Aug 02, 2022

help-circle
rss

@kixik Thanks to good macro system Rust can (via enum_dispatch) transform those lookups into a switch statement which is best of both worlds IMO.


@kixik Inheritance can always be substituted by composition which is what #Rust does pretty well. Constexpr isn’t on C++ level, but I guess you can generate code from build script so there’s ways around it.
As for virtual functions - Traits are effectively to virtual function lookup table declarations that get used by dyn SomeTrait type. So calling a fn on Box\<dyn T\> generates VMT lookup.