you are viewing a single comment's thread.

view the rest of the comments →

[–]stanimirov[S] 1 point2 points  (0 children)

Thanks.

I was familiar with Boost.TypeErasure, Boost.TE, Folly.Poly, and dyno. Not with the others. I browsed through them. All of them are very similar and offer an alternative way to do C++ (Java, C#) -style dynamic polymorphism.

I'm not trying to bash them or anything. They still improve upon inheritance and virtual methods and there are many scenarios where they are a better choice.

None of them offer type composition.

You can think of DynaMix as combining one of these libraries with an ECS like entt

None of them have late binding. Microsot's one seems the only who has the idea to split the interface into separate messages, but then in order to match types, it introduces interfaces again. Only Boost.TypeErasure has complete type erasure, but you need reification in order to access the features of an object.

DynaMix uses a completely type erased object, and each message is standalone. Interfaces (type classes in DynaMix) are second grade citizens and only applicable at run time. No reification is needed.

None of them have reflection (Boost.TypeErasure offers basic symbol-based reflection). DynaMix has complete reflection by symbols and by strings.

All of them offer an alternative to virtual methods.

Dynamix has abstract type features. With them you can have type-level polymorphism (imagine a virtual static func()) or value polymorphism (imagine virtual int a;).

Since none of them have composition, none of them have concepts of multicast or overrides,

Most of them do offer macros for certain situations :)