Ralith / hecs

A handy ECS
Apache License 2.0
960 stars 82 forks source link

Explore operation-oriented Bundle refactor #249

Open Ralith opened 2 years ago

Ralith commented 2 years ago

The current Bundle traits are data-oriented, exposing properties of the bundle, and fairly complex as a result of that, and somewhat unstable besides. This ugliness is part of why they're currently considered an impl detail. If we instead orient the trait interfaces around performing desired operations directly, the result might be significantly cleaner, even after exposing necessary interfaces on World/etc for implementers to call into.

Ralith commented 2 years ago

This might also help us get rid of the ugly double indirect function call in <&BuiltEntityClone as DynamicBundle>::put.