On Sunday, 14 May 2017 at 17:29:44 UTC, jmh530 wrote:
On Saturday, 13 May 2017 at 08:10:20 UTC, 9il wrote:

The documentation for mir.functional might need an update based on the refTuple change. The links at the top are missing refTuple and RefTuple. tuple doesn't go anywhere, also ref doesn't either.

Thanks, fixed.

I didn't really realize these were in there. How does it compare to std.typecons.Tuple? I was thinking about doing some work with std.typecons.Tuple's that hold mir.slices and not sure if I should use RefTuple instead.

1. RefTuple can hold pointers instead of values. For example Mir's zip, cartesian use RefTuples. This makes zip faster and more flexible, because it is partially mutable compared with Tuple.

2. Ndslice composed of RefTuples has special syntax with Map, for example "a + b" instead of "a[0] + a[0]" .

3. RefTuple does not ha ` [0]` syntax or other names then `a`, `b`, `c`.

4. RefTuple is faster to compile, though


auto s = zip(mask, b, c).map!"a ? b : c";

Loads either a or b.

Reply via email to