https://gist.github.com/cart/96b1d39cd04274da566dbf28bf87c2a...
https://gist.github.com/cart/96b1d39cd04274da566dbf28bf87c2a...
I swear, people behind Rust would replace every single textual keyword with a symbol if they could.
This enables us to (statically) extract information from the type signature of the function and use it to populate the relevant values using the ECS. We also use this type information to automatically (and safely) parallelize system execution based on what ECS resources are accessed (and if they are mutated).
We do (internally) use macros to implement our IntoSystem trait for all relevant function types, but there are no macros in user-facing code.
But I would never use such a feature, it increases the code mental load (what you should know before being able to read the code).
From one codebase to another, I can't even keep the same assumptions.