Proposal: priority queues in containers

Evan Laforge qdunkan at
Thu Mar 18 11:56:41 EDT 2010

On Thu, Mar 18, 2010 at 7:43 AM, Louis Wasserman
<wasserman.louis at> wrote:
> Oh, god, so much to respond to...heh.

You did request feedback back there, didn't you :P

>> As does Python. In Python, though, the PQ implementation is not a built-in
>> class in the default namespace (as are dict and set).  Rather, it is one of
>> the "batteries included" libraries that come with Python. I think that's the
>> right place for it in Haskell, too.
> I don't know Python, but according to Wikipedia, dict and set are built into
> the language.  I don't think it's a fair comparison: set and dict in Python
> seem to have a role almost as ubiquitous as [] in Haskell, much more

It's not really the same.  pqueue is not in the built-in namespace in
python, that's like the Prelude in haskell.  pqueue *is* in the
default library, which every python installation will have since it
comes with the default download, this is what's meant by "batteries
included".  So that's like containers: you have to explicitly import
it, but you shouldn't worry about installations that don't have it
because it comes with the compiler.

The main difference is that python doesn't have cabal and doesn't have
anything like the haskell platform and installing new packages, while
easy, is not as automatic as cabal can be.

> After about five hours' work (!!!) I *finally* managed to install Criterion
> yesterday, so I'll send out those tests ASAP.

I wanted to use criterion too at one point, but it looked too hard to
install so I was scared away...

More information about the Glasgow-haskell-users mailing list