From: Thorsten Ohl <ohl@hep.tu-darmstadt.de>
To: caml-list@inria.fr (OCAML)
Cc: Markus Mottl <mottl@miss.wu-wien.ac.at>
Subject: additions to standard library?
Date: Thu, 9 Mar 2000 14:18:23 +0100 (CET) [thread overview]
Message-ID: <14535.42143.144192.811309@heplix4.ikp.physik.tu-darmstadt.de> (raw)
In-Reply-To: <200003071524.QAA12371@miss.wu-wien.ac.at>
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.
> CVS-repository [...] "peer review"
That's a brilliant idea!
Here's another issue in the same problem domain, that might be more
interesting for developers: wouldn't it be possible to add a language
feature that allows to extend module implementations without opening
the pandora box of classes with inheritance?
Currently, we can use `include' to extend module types, but not
implementations. I'm thinking of something like
module type ThoList =
sig
include List (* doesn't work because list.mli is a file,
but you get the idea :-) *)
val flatmap : ('a -> 'b list) -> 'a list -> 'b list
end
module ThoList : ThoList=
sig
include List
let rec flatmap f = function
| [] -> []
| x :: rest -> f x @ flatmap f rest
end
Cheers,
-Thorsten
--
Thorsten Ohl, Physics Department, TU Darmstadt -- ohl@hep.tu-darmstadt.de
http://heplix.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
next prev parent reply other threads:[~2000-03-10 8:07 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 [this message]
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
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=14535.42143.144192.811309@heplix4.ikp.physik.tu-darmstadt.de \
--to=ohl@hep.tu-darmstadt.de \
--cc=caml-list@inria.fr \
--cc=mottl@miss.wu-wien.ac.at \
/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).