get from tuple by type
Charles Cooper via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 15 16:30:48 PDT 2015
Not offended at all :), in fact it was not even my suggestion
that it be included in the standard. I was just knee jerk
reacting to the comment that, just because something is simple to
do precludes it from getting standardized
On Sunday, 15 March 2015 at 23:28:18 UTC, ketmar wrote:
>
> sorry if you feel offended, i never meant that. what i meant is
> that it's
> hard in c++, but easy in D when one knows how to do that. i've
> learned D
> mostly by reading other people code, and there is nothing wrong
> in asking
> questions, quite the contrary.
>
> but the requested solution is not "universal" enough to be
> included in
> Phobos (what if i want an index instead of a value? or (index,
> value)
> tuple? or just check if it is there? or find either `int` or
> `double`?).
> it's easier to write specialized template for required cases
> than to try
> to make it generic (and complex) enough. but it's much harder
> to write
> that in c++, to the extent that it's easier to include that
> things in
> standard.
>
> just stay with us and you will see that D shines in such things
> (and in
> many other areas too ;-).
More information about the Digitalmars-d-learn
mailing list