On Tue, Jun 4, 2013 at 11:37 AM, Walter Bright <newshound2@digitalmars.com> wrote:
On 6/4/2013 11:04 AM, John Colvin wrote:
On Tuesday, 4 June 2013 at 17:50:47 UTC, Walter Bright wrote:
What value does a function which just passes an alias to another one add?

A unified interface called "compress" that takes a compression function as an
alias (with e.g. lzwCompress as a default) seems like a nicer way of working,
seeing as people don't necessarily care/know about which algorithm they're
using, they just want to compress something a bit.

Also, it would be cool if a range could remember which algorithm it was
compressed with (as it's type? I.e. LzwRange), so a generic function "expand"
could call the appropriate ***Expand

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);