get from tuple by type
Charles Cooper via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 15 16:19:43 PDT 2015
Thanks for the style recommendations.
On Sunday, 15 March 2015 at 23:14:32 UTC, anonymous wrote:
> I don't think there is. I don't know if there should be.
> Distinguishing tuple fields by their type doesn't seem very
> useful to me, since multiple fields can have the same type.
>
> Using combined syntax for function template.
>
> Made the tuple a function parameter like in the C++ version. I
> don't see the point in having it a template alias parameter.
>
> Dropped `nothrow @nogc @safe`, since copying the member might
> not be any of that. They are inferred when possible.
>
> Employing inout and `auto ref`.
>
> More tests. unittest block instead of `static assert`s.
>
> Bikeshedding:
>
> Changed name to "getFirst", since subsequent values of the same
> type are ignored.
>
> Named things more like the C++ version: member_t -> T,
> tuple_instance -> t.
>
> Use selective imports instead of static imports.
>
> Use more common casing: types and type templates are
> PascalCased, everything else is camelCased.
>
> Brace placement.
More information about the Digitalmars-d-learn
mailing list