Mixin programming foreach
eXodiquas
exodiquas at gmail.com
Mon Sep 27 18:42:37 UTC 2021
On Monday, 27 September 2021 at 17:14:11 UTC, Ali Çehreli wrote:
> [...]
Woah, thanks everyone for the ridiculous precise and helpful
answers I got here.
This forum never disappoints. :P
I now try to fully understand the answers and implement the
solution to the problem in a cleaner way. The reason I wanted to
hold on to the single members, is because I implemented Vector2
and Vector3 by hand and I personally did not need higher
dimensional vectors, but because I write this library as open
source I could imagine some other developer may need more than 3
dimensions and it would be great if all those vectors behave
exactly the same way. For example, the components of my `Vector2`
are accessible via `v.x` and `v.y`. Otherwise I have to do
something like `Vector4.components[0]` which doesn't look that
nice imo.
But with the new insight I got, I should be able to cook
something up.
Thanks again everyone.
Have a great day,
eXodiquas
More information about the Digitalmars-d-learn
mailing list