glm-rs icon indicating copy to clipboard operation
glm-rs copied to clipboard

Using Associated Constants to simplify code

Open nrxus opened this issue 7 years ago • 2 comments

With the soon to be stabilitized associated constants, I wonder if this project would greatly benefit for rewriting some of the Vec code to use them.

This would allow for Vec's to be not limited to 2,3,4, and allow the code to be more readable by having less macros around it. I am sure there are many other quick wins we could get from them on this project but these are the first couple that came to mind.

(unsure if this project is still maintained)

nrxus avatar Jul 11 '17 18:07 nrxus

Just thought I'd add that this feature is now stable. @dche I'd be interested to hear your thoughts on this.

mitchmindtree avatar Sep 02 '17 04:09 mitchmindtree

Sorry for the late reply.

I think @nrxus 's thoughts are all valid and possible.

I was forced to use macros to implement many parts of glm-rs and awkwardly to know that rust's zero cost abstraction was achieved only by using macros extensively. But it was about 2 yrs ago, and hopefully (since I've not follow Rust evolution for a long while, sadly) new Rust features added later on can let us use natural language constructs to implement most stuff. So a re-design based on new features is really necessary and welcomed.

Thanks.

dche avatar Sep 07 '17 18:09 dche