Andlon/dynamecs

Avoid using `any::type_name()`

Opened this issue · 0 comments

Currently we use type_name() for identifying systems. However, this has several issues. For one, it's not necessarily unique for two different types T1, T2. However, a potentially bigger problem is that the same type could technically produce different names when type_name() is called from different locations in a program. Certainly there are no guarantees here.

It appears a better way might be to make a tag available in the Component trait, which can be used to produce storage tags. I'm thinking something like domain.ComponentName. Then we can provide a derive(Component) macro which allows you to specify domain and derives ComponentName from the type name.