caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dave Mason <dmason@sarg.ryerson.ca>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Suggestion about balanced trees in stdlib
Date: Sat, 11 May 2002 13:36:39 -0400	[thread overview]
Message-ID: <200205111736.g4BHaeU21008@sarg.ryerson.ca> (raw)
In-Reply-To: Your message of "Sat, 11 May 2002 19:18:18 +0200." <20020511171818.GA6384@cs.unibo.it>

A less-dirty idea:

Sorry, I scanned Gerd's comment and deleted it.  I agree unifying Set
and Map would be good, but don't like the idea of *increasing* the
size of an existing module's data structure.  And I'm not crazy about
Stefano's dirty trick.  :-)

Gerd suggested that the int weighting factor could be turned into a
constructor.  Doing that would save the word that making a Set be a
unit Map would cost, so Set would be the same size as now, Map would
be smaller, and they'd be integrated.  (Yes, you could make Set yet
smaller, but this way that complexity (of constructors) is only in one
place.

You could also save that extra word, and make it a little faster with
the ugly trick of using recursive records, where a record that points
to itself is the sentinel for Empty... but then the = operation
becomes non-terminating, so this isn't something that I think is worth
it in a stdlib kind of module.

Sorry if I missed something, and this is senseless mumbling...

../Dave
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-05-12 15:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-10 16:59 Gerd Stolpmann
2002-05-10 16:56 ` Alexander V.Voinov
2002-05-10 22:31 ` Stefano Zacchiroli
2002-05-10 23:05   ` Alexander V.Voinov
2002-05-11  7:20     ` Stefano Zacchiroli
2002-05-11 15:47   ` Gerd Stolpmann
2002-05-11 17:18     ` Stefano Zacchiroli
2002-05-11 17:36       ` Dave Mason [this message]
2002-05-12  0:03       ` polux moon
2002-05-13  7:23 ` Mattias Waldau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200205111736.g4BHaeU21008@sarg.ryerson.ca \
    --to=dmason@sarg.ryerson.ca \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).