std.compress

Jonathan M Davis jmdavisProg at gmx.com
Sun Jun 9 00:53:06 PDT 2013


On Sunday, June 09, 2013 17:12:16 Daniel Murphy wrote:
> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
> news:koncgm$9f5$1 at digitalmars.com...
> 
> > On 6/5/13 2:55 AM, Timothee Cour wrote:
> >> What I suggested in my original post didn't involve any
> >> indirection/abstraction; simply a renaming to be consistent with
> >> existing zlib (see my points A+B in my 1st post on this thread):
> >> 
> >> std.compress.zlib.compress
> >> std.compress.zlib.uncompress
> >> std.compress.lzw.compress
> >> std.compress.lzw.uncompress
> > 
> > I think that's nice.
> > 
> > Andrei
> 
> This has the problem that you now can't import more than one compression
> module and still use ufcs.  The annoying one I keep hitting in phobos is
> std.file.write vs std.stdio.write.  For range-based APIs it is a huge pita
> to have to switch away from ufcs.  I think xyzCompress is still pretty
> sweet, consistent, and completely fixes the problem.  It has the added
> benefit that you can tell which compression algorithm is being used without
> having to know what is imported.

That can be fixed by using a local alias, but it's true that it's an extra 
annoyance.

- Jonathan M Davis


More information about the Digitalmars-d mailing list