std.compress

Peter Alexander peter.alexander.au at gmail.com
Tue Jun 4 12:41:59 PDT 2013


On Tuesday, 4 June 2013 at 19:00:35 UTC, John Colvin wrote:
> On Tuesday, 4 June 2013 at 18:46:49 UTC, Walter Bright wrote:
>> On 6/4/2013 11:43 AM, Timothee Cour wrote:
>>> writing generic code.
>>> same reason as why we prefer:
>>> auto y=to!double(x) over auto y=to_double(x);
>>
>> The situations aren't comparable. The to!double case is 
>> parameterizing with a type, the compress one is not. Secondly, 
>> compress(lzw) does ABSOLUTELY NOTHING but turn around and call 
>> lzw. It adds nothing.
>
>
> Currently. However, compress could become more feature-rich in 
> the future. Perhaps there's some scope for automatic 
> algorithm/parameter selection based on the type and length(if 
> available) of what gets passed.

I think this is over-engineering. It's unlikely that an 
application will need to support multiple compression algorithms 
in the same piece of code, and even if it did, it would be 
trivial to implement this on top of the simple interface that 
Walter is using.


More information about the Digitalmars-d mailing list