If you want to convert a range to an array, use std.array.array

This is a constant source of confusion and it also is a crappy design to use a function in a totally different module for this purpose imho. Can't these Result types get an eval() method and/or be made implicitly convertible to an array where appropriate?

The C++ matrix library Eigen uses this approach and it works out fantastically. a*b returns an object representing this expression. If I do want to use this I write 'auto c=a*b;'. If I want the result I can explicitly use its eval() method (which is especially useful inside a bigger expression) or something like 'Matrix c=a*b;' which also evaluates the expression.

Reply via email to