Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@best.com>
To: Francisco Valverde Albacete <fva@tsc.uc3m.es>
Cc: ohl@hep.tu-darmstadt.de, caml-list@inria.fr,
	Markus Mottl <mottl@miss.wu-wien.ac.at>,
	Pierre.Weis@inria.fr
Subject: Re: additions to standard library?
Date: Sat, 11 Mar 2000 10:49:07 -0800 (PST)	[thread overview]
Message-ID: <Pine.BSF.4.21.0003111005080.1473-100000@shell5.ba.best.com> (raw)
In-Reply-To: <38C8C895.A0B778FC@tsc.uc3m.es>

On Fri, 10 Mar 2000, Francisco Valverde Albacete wrote:
> Thorsten Ohl wrote:
> 
> > Markus Mottl <mottl@miss.wu-wien.ac.at> writes:
> >
> > > Hello, it sometimes happens that I need functions on abstract data
> >             ^^^^^^^^^ often :-)
> > > types in the standard library which are not available there, but
> > > could be considered as "usual" operations on such data.
> >
> > > Some specific examples include, e.g.:
> >
> > My favorites are Map and List, of which I keep carrying around
> > turbocharged versions.
> 
> Yes... I've done the coding of functional iterators on some dozen ADT
> (written as functors or modules) by now. At first I pretended that they would
> not be necessary but in the end I found I had to code them all, (with all the
> fuss added of making them visible in the signatures of the implementations,
> etc).

>From what I understand, this is what classes and objects are for, though
of course in OCaml there aren't yet polymorphic methods so you lose a lot 
in trying to write extensible ADTs in OCaml this way. If we had
polymorphic methods would that tip the balance in favor of classes for a
utility library? 

> ... snip ...
> 
> PRO: The good thing as X. Leroy stated some time ago is that we do not incur
> in any penalty for such definitions.

I bet a lot of the penalty of OO style could be eliminated if you have a 
compiler that does lots of global analysis, like the SmallEiffel 
compiler. 

> My proposal for now (not the most elegant, I know) would be to add a
> syntactic feature in the language similar to "include" for signatures, but
> effecting textual inclusion of module code, as T.Ohl suggests. Some time ago
> I thought this could be managed by using Camlp4, the caml preprocessor, but
> then the implementor suggested it was hardly used except for Coq and I was
> loath to tackle with it.

That's too bad, I think that some kind of macro approach might be useful
for this problem.

-- Brian




  parent reply	other threads:[~2000-03-13  9:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-07 15:24 Markus Mottl
2000-03-08 19:03 ` Jean-Christophe Filliatre
2000-03-08 22:29   ` Markus Mottl
2000-03-10 10:51     ` Christian RINDERKNECHT
2000-03-09 13:18 ` Thorsten Ohl
2000-03-10 10:04   ` Francisco Valverde Albacete
2000-03-10 20:33     ` Markus Mottl
2000-03-14 23:15       ` Max Skaller
2000-03-11 18:49     ` Brian Rogoff [this message]
2000-03-12  1:54 ` Jerome Vouillon
     [not found]   ` <200003120239.DAA18581@miss.wu-wien.ac.at>
2000-03-14 17:53     ` Pierre Weis
2000-03-10 17:55 Manuel Fahndrich
2000-03-14 17:24 Don Syme
2000-03-21 21:08 ` John Max Skaller
2000-03-21 21:43 Don Syme

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=Pine.BSF.4.21.0003111005080.1473-100000@shell5.ba.best.com \
    --to=bpr@best.com \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=fva@tsc.uc3m.es \
    --cc=mottl@miss.wu-wien.ac.at \
    --cc=ohl@hep.tu-darmstadt.de \
    /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