ndarray icon indicating copy to clipboard operation
ndarray copied to clipboard

Consider allowing static Shape for ArrayBase

Open fRbOl23 opened this issue 3 years ago • 0 comments
trafficstars

Everything is in the title, I think. Marking the ArrayBase with a static Shape could indeed be effective to add more type checking and as such permitting compile time and not runtime error.

I think it could become pretty handy for the Dot implementation, and moreover for all arithmetic operations, and while const context is far from being as flexible as it could be in the future, they are still quite valuable today. If anything cannot be expressed in such a way, up-casting to a generic default could be a manageable workaround, and then leaving the developer downcast it.

As for backward compatibility, making the functions const generic could work, or then using a generic default.

Everything being said, I wonder whether this crate will take such a direction.

(This issue is inspired by #132 where I've also answered with most of this issue) Otherwise, thank you for this pretty good crate. (Excuse me for my English, it's not my mother tongue)

fRbOl23 avatar Oct 15 '22 13:10 fRbOl23