On 6/4/13 2:43 PM, Timothee Cour wrote:
    What is the improvement of typing:

        compress(lzw)

    over:

        lzwCompress()

    ?


writing generic code.
same reason as why we prefer:
auto y=to!double(x) over auto y=to_double(x);


I think the application here is a bit more tenuous. It's natural to think of a type-parameterized algorithm that needs to!T. But it's more of a long shot to think of an algorithm statically parameterized on the compression method. That could definitely intervene, but it's not likely to be frequent; and if it's not, a mixin can always take care of it.

Andrei

Reply via email to