Casting the Result of splitter() into a string array
Trass3r
un at known.com
Sun Jun 17 06:41:46 PDT 2012
> 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.
More information about the Digitalmars-d-learn
mailing list