Comments by "p11" (@porky1118) on "Compiler-Driven Development in Rust" video.
-
@NoBoilerplate Rust macros are far from powerful enough.
I could technically create a macro which generates all types for N-Dimensional GA.
But then if multiple libraries use this macro, these libraries will be incompatible, since both generate their own multivector types.
Besides that, I have to choose a dimension in advance. The number of multivector types for each dimension N is at least 2^N.
It's technically possible, but it's not great.
What's great about scopes is that there are macros, which return types and memoize their results.
So if I have a multivector type as a macro (for example a quaternion MultiVector!<e, e12, e13, e23>), it would implicitly create the type definition only once at toplevel, and every usage of this macro will refer to the same type.
2
-
1
-
1