From: Brian Hurt <bhurt@spnz.org>
To: skaller <skaller@users.sourceforge.net>
Cc: Matt Gushee <mgushee@havenrock.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Snd question
Date: Sat, 20 Aug 2005 09:31:40 -0500 (CDT) [thread overview]
Message-ID: <Pine.LNX.4.63.0508200913160.21795@localhost.localdomain> (raw)
In-Reply-To: <1124198264.13635.25.camel@localhost.localdomain>
On Tue, 16 Aug 2005, skaller wrote:
> I think the original question really meant:
>
> Why aren't "fst" and "snd" properly generic??
Sorry for joining the discussion late, but I question the need for fst and
snd in general. Whenever I find I'm using these functons regularly, I
find that I'm using tuples when I should be using structures. This is
especially the case when I'm future proofing the data structure, i.e. I
want to be able to add fields later on without having to rewrite all the
code.
This is one of the things I like about Ocaml- the lack of golden hammers,
but the rich variety of tools available. A lot of languages do seem to
have golden hammer data structures especially- consider lists in Lisp or
associative arrays in Perl. The sure sign of a golden hammer data
structure is that it's the one you pick if you're not sure what data
structure you need. Now, Ocaml doesn't have one. Ocaml doesn't have any
one single data structure which is always the right one. Tuples,
structures, objects, variant types, arrays, and lists all have some
overlap, and some unique features. There is no golden hammer, but there
is a rich and powerful enough set of tools that I've yet to see a
situation where the right tool for the job wasn't at hand.
Brian
prev parent reply other threads:[~2005-08-20 14:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 22:05 Anu Engineer
2005-08-15 22:41 ` [Caml-list] " Matt Gushee
2005-08-16 8:08 ` sejourne kevin
2005-08-16 13:17 ` skaller
2005-08-16 16:16 ` Julian Brown
2005-08-16 17:18 ` [Caml-list] " Alan Falloon
2005-08-17 6:15 ` skaller
2005-08-16 16:34 ` [Caml-list] " Jon Harrop
2005-08-16 18:16 ` Richard Jones
2005-08-16 21:42 ` Jon Harrop
2005-08-17 6:55 ` skaller
2005-08-18 8:20 ` Andrej Bauer
2005-08-18 17:51 ` skaller
2005-08-19 7:50 ` Andrej Bauer
2005-08-17 12:19 ` Alain Frisch
2005-08-17 17:21 ` skaller
2005-08-17 23:08 ` Martin Jambon
2005-08-17 6:28 ` skaller
2005-08-20 14:31 ` Brian Hurt [this message]
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.LNX.4.63.0508200913160.21795@localhost.localdomain \
--to=bhurt@spnz.org \
--cc=caml-list@inria.fr \
--cc=mgushee@havenrock.com \
--cc=skaller@users.sourceforge.net \
/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