From: Michel Schinz <michel.schinz@csem.ch>
To: caml-list@inria.fr
Subject: Re: Looking for a nail
Date: 25 Jan 1999 13:45:34 +0100 [thread overview]
Message-ID: <uvhhvv7v5.fsf@csem.ch> (raw)
In-Reply-To: Miles Egan's message of "24 Jan 1999 22:43:16 +0100"
Miles Egan <cullenx@earthlink.net> writes:
[...]
> 1. Extend OCaml's Unix library. What's already there is very useful,
> but there are quite a few functions missing. I'd be happy to help
> fill this out, although I'm new enough to OCaml and functional
> programming that I'm still not sure if some Unix functions were
> omitted because of their stateful semantics.
I think it would be nice if you took a look at scsh for that part.
Scsh is a Scheme interpreter with a complete Posix interface. The
design of scsh is really great IMHO and you could take many ideas from
it (mostly because Scheme is also a functional language, and the
design of scsh is also quite functional). However, porting the
complete scsh design to CAML is not trivial, since CAML (at least
Objective CAML) doesn't have a macro system, and Scheme's macros are
heavily used in scsh.
Anyway, the scsh page is at http://www-swiss.ai.mit.edu/scsh/
[...]
> I'd appreciate any criticisms of these projects or any suggestions
> for others.
Here is a "big" suggestion: what I'd really like to see for OCaml is a
good and consistent data structure library. The one shipped with OCaml
is quite good, but there are some things I do not like about it:
- some parts are "imperative" (Array, Hashtbl, ...), while others are
"functional" (Set, Map, ...),
- the interface of some of the modules are not as complete as one
might wish (in almost all of my projects, I end up writing some
basic functions, like list partitioning, ...),
- the interface of the different modules is not always consistent
(e.g. in the Map module, the map is always given as the last
parameter, while in the Hashtbl module, the table is given as the
first argument, and that is confusing sometimes [and sometimes it
also prevents the use of partial application]),
- none of the modules use the OO features of OCaml.
So, what I would really like to do (if only I had time) is:
1. take a good look at many good standard libraries of many languages,
functional or not, object-oriented or not (e.g. Haskell, MIT
Scheme, Common Lisp, C++'s STL, Eiffel, Okasaki's book, ...) and
identify the most important data structures and the important
operations that can be performed on them,
2. design two different versions of the library: one purely
applicative, and the other one with in-place modification (note
that these two versions could be different, because some data
structures might not be efficient or interesting enough in the two
versions; however, it would be great if the two designs were as
similar as possible),
3. implement these two versions of the library,
4. document them thoroughly (e.g., give the complexity of every
function, ...).
I'm still unclear about the OO features of OCaml, so I do not know
whether they should be used or not for these libraries.
Designing a good library is usually really hard, but I think that it's
a crucial point. C++ for example has almost become usable now that the
STL exists. And one of the main reasons why Common Lisp is usually
preferred to Scheme for big applications is that the former has a good
standard library (which is in fact part of the language itself) while
the latter has none (yet).
Michel.
next prev parent reply other threads:[~1999-01-25 19:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-24 21:06 Miles Egan
1999-01-24 23:01 ` Lyn A Headley
1999-01-25 8:44 ` Jean-Christophe Filliatre
1999-01-25 20:45 ` Markus Mottl
1999-01-25 13:36 ` mattwb
1999-01-25 20:48 ` Trevor Jim
1999-01-25 21:57 ` Gerd Stolpmann
1999-01-25 12:45 ` Michel Schinz [this message]
1999-01-25 20:37 ` Markus Mottl
1999-01-28 9:54 ` Michel Schinz
1999-01-28 14:13 ` Markus Mottl
1999-01-25 20:53 Hendrik Tews
1999-01-26 19:20 ` Ian T Zimmerman
1999-01-28 1:30 ` John Prevost
1999-01-28 20:10 ` Hendrik Tews
1999-01-27 1:29 ` Jacques GARRIGUE
1999-01-27 8:27 ` Jean-Christophe Filliatre
1999-01-28 9:34 ` Cuihtlauac ALVARADO
1999-01-28 13:32 Don Syme
1999-01-29 0:25 ` Markus Mottl
1999-01-31 18:43 ` John Whitley
1999-01-29 0:45 Frank A. Christoph
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=uvhhvv7v5.fsf@csem.ch \
--to=michel.schinz@csem.ch \
--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