On Tuesday, 17 March 2015 at 12:52:01 UTC, Atila Neves wrote:
On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote:

This discussion happens often when discussing C++'s or D's `auto`. It doesn't matter what the type is, what matters is in the interface.

As for storing it:

auto foo = voldemort();

Oh, you meant in a struct?

struct Foo(T) {
   T thingie;
}

auto foo(T)(T thingie) {
    return Foo!T(thingie);
}

auto f = foo(voldemort());

Atila

That proves my point cost for the user just so the library designer can group his type inside the function that returns it.

How many times is csvReader used vs how many times is it written. It it's 100 to 1, that's 100 times the cost to the user vs 1 x the cost to the library author.

I cant help thinking it's like how when programmers first learn about design patterns they start trying to make everything they can into a ****ing singleton.

Reply via email to