std.compress

Daniel Murphy yebblies at nospamgmail.com
Thu Jun 13 16:45:16 PDT 2013


"David Nadlinger" <code at klickverbot.at> wrote in message 
news:ahqzxzjbhmfiacwjgfkj at forum.dlang.org...
> On Thursday, 13 June 2013 at 11:36:16 UTC, Daniel Murphy wrote:
>> Ok, how exactly is the data compressed in the following snippet?  No
>> scrolling up to the top of the module to see what's imported!
>
> I don't need to scroll to the top of the module, just a few lines up 
> because I'm using function-local imports anyway. :P
>
> If you want extra verbosity (which can be good *sometimes*), just write 
> "import lz77 = std.compression.lz77" and you are good to go.

I don't think 4 characters is a high price to pay for the added clarity. 
Then there is no ambiguity, no need to rename imports, no problems using 
ufcs.  Every time I see lz77Compress in anybody's code I know exactly what 
it does!

I understand the motivation for shortening function names that will be used 
frequently... but this is not in that category. 




More information about the Digitalmars-d mailing list