Consider implementing From<TupleOfLengthN> for VectorN
Problem space: I recently noticed that the following compiles:
Vector3::<f32>::from([1.0, 1.0, 1.0]);
while in contrast this does not:
Vector3::<f32>::from((1.0, 1.0, 1.0));
For the some reason or other, a user may store float data in a tuple at some point.
Current workarounds:
Converting a tuple of size N to a VectorN is still possible by taking the constituent parts.
let pt = (1.0, 1.0, 1.0);
let (x, y, z) = pt;
let p: Vector3<f32> = Vector3::new(x, y, z);
Or more directly:
let pt = (1.0, 1.0, 1.0);
let p: Vector3<f32> = Vector3::new(pt.0, pt.1, pt.2);
Proposed solution:
For ergonomics, implementing From for tuples of the same length as a vector could be desirable.
Further questions:
While impl From<(f32,f32,f32)> for Vector3<f32> may make sense, the question of whether tuples where the size is greater than 6 is worth considering (but tuples of particularly long length are probably an irregular case).
I think this raises the question of how far nalgebra should go to implement conversion traits. Every impl increases maintenance burdens for nalgebra.
Arrays are the natural representation for vector data, so it makes sense for nalgebra to provide conversions. Users can store their data in a multitude of ways. (x, y, z) seems rather niche to me personally; at least I can't think of a case where I would store points/vectors in this way.
Really appreciate the well-structured issue, but personally I don't think there's enough motivation behind this feature at the moment to justify inclusion in nalgebra.
(note: this is my opinion, I do not have the final say)