caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Don Syme <dsyme@microsoft.com>
To: "'Jacques Garrigue'" <garrigue@kurims.kyoto-u.ac.jp>,
	"'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: RE: Syntax for label, NEW PROPOSAL
Date: Fri, 17 Mar 2000 09:03:56 -0800	[thread overview]
Message-ID: <39ADCF833E74D111A2D700805F1951EF18014511@RED-MSG-06> (raw)


I really don't see people clamouring for lots of labels in the standard
library (besides the inventors of the language feature, who don't really
count, for lots of obvious reasons - over exposure to the feature, over
familiarity with the label names, a natural bent to program in a particular
way that led them to the feature in the first place, self-selection as
people who think the feature is the best thing ever).

I reiterate my bottom line: only add labels to a particular function if you
can strongly argue that they will actually decrease the number of mistakes
made by typical users that are not already caught by the typechecker.  Don't
argue about "labels being good practice" - programmers don't care about what
someone else sees as good practice (we'd all be using Ada if they did) -
they care about getting 90% of their code right first time, which is what
the Caml type checker already ensures.

That is, you need to argue when and where labels are _good_, and not just
why they are _harmless_.  (And in the world of language design, no extra
language feature is truly harmless).  IMHO, one of the only functions in the
standard library that comes close to needing labels is "blit", and I've
already argued why it's marginal that they are even of much help there.

Four more points:

o The fact that you've had to resort to "modes" at all indicates something
is wrong.  The point about O'Caml is that you shouldn't have to understand
_anything_ about labels, objects, modules or syntax modes to use the system
as a new user.  You shouldn't have to see any labels, nor have to ask "what
are these two modes all about", nor have to try to understand why some of
the arguments have labels and some don't.

o The "just documentation" response doesn't really hold water, because if
the labels were just documentation, then they would different.  For example,
"fun", being a keyword, is highly confusing and not terribly descriptive -
any sensible prototype would probably just use "f".  And C prototypes look
_horrible_ when you have both higher order arguments and argument names.

o A quick poll of 2 of my Standard ML friends down the corridor about what
they think of labels going in the standard library, and they all said
"gross".

o To ensure "living happily together", my feeling is you should leave the
standard library alone (though I could live with 2 or 3 functions having
labels), but go wild with labels and variants in the places were no one
doubts they will be useful.

Cheers!
Don


-----Original Message-----
From: Jacques Garrigue [mailto:garrigue@kurims.kyoto-u.ac.jp]
Sent: 17 March 2000 15:23
To: caml-redistribution@pauillac.inria.fr
Subject: RE: Syntax for label, NEW PROPOSAL


Having seen a number of recent messages against having labels in the
standard library, I have the feeling that there is a lot of confusion
here, and I would like to make a few points clear.

* In default (classic) mode, writing labels is (and will stay) not
  required. For those users that do not like labels, or do not want to
  bother with them, or just are starting to learn ML, labels in the
  standard library are just some form of documentation, like argument
  names in C prototypes.
  Honestly, I have never heard anybody protesting against having
  argument names in C prototypes.

* While not requiring labels, classic mode provides some support for
  them, meaning that casual users can put some labels in their
  programs if they want. This also means that any library written in
  modern mode (where labels matter) will be available with the same
  comfort in both classic and modern mode, and, more interestingly,
  according to the _user_'s taste rather than to the implementor's.

* What we are discussing about is modern mode. This is not pedantic
  mode, this is just another typing discipline. This basically doesn't
  concern people who are not very fond of labels, and will be perfectly
  happy with classic mode.

* Pierre expressed his concern that modern mode would make more
  difficult some nice programming style. I perfectly agree with him,
  but I think this specific problem can be solved without removing
  labels from the library.

Looking at the messages, there are clearly people who prefer (heavily)
labelled style, and others who prefer fewer or no labels. But they all
agree that Caml is and should stay a great _functional_ language.
Let's all live happily together: modern and classic mode are there for
that!

Jacques



             reply	other threads:[~2000-03-17 18:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17 17:03 Don Syme [this message]
2000-03-17 19:24 ` John Prevost
  -- strict thread matches above, loose matches on Subject: below --
2000-03-17 21:33 Damien Doligez
2000-03-18 21:07 ` Frank Atanassow
2000-03-18 22:40 ` John Prevost
2000-03-15 20:40 Don Syme
2000-03-17  9:48 ` Jacques Garrigue
2000-03-17 17:34   ` Dave Mason
2000-03-18  0:26     ` Jacques Garrigue
2000-03-23 13:07       ` Sven LUTHER
2000-03-14 16:53 Syntax for label Don Syme
2000-03-15  3:15 ` Syntax for label, NEW PROPOSAL Jacques Garrigue
2000-03-15  6:58   ` Christophe Raffalli
2000-03-15 21:54     ` Julian Assange
2000-03-15 11:56   ` Wolfram Kahl
2000-03-15 13:58   ` Pierre Weis
2000-03-15 15:26     ` Sven LUTHER
2000-03-17  7:44       ` Pierre Weis
2000-03-15 17:04     ` John Prevost
2000-03-17 10:11       ` Jacques Garrigue
2000-03-15 17:06     ` Markus Mottl
2000-03-15 19:11     ` Remi VANICAT
2000-03-17  8:30       ` Pierre Weis
2000-03-17 14:05         ` Jacques Garrigue
2000-03-17 16:08           ` Pierre Weis
2000-03-15 21:30     ` John Max Skaller
2000-03-16  2:55     ` Jacques Garrigue
2000-03-17 15:13       ` Pierre Weis
2000-03-17 17:33         ` Wolfram Kahl
2000-03-18 11:59         ` Jacques Garrigue
2000-03-21 16:51       ` Pascal Brisset
2000-03-23 11:14         ` Nicolas barnier
2000-03-16  8:50     ` Pascal Brisset
2000-03-17 11:15       ` Sven LUTHER

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=39ADCF833E74D111A2D700805F1951EF18014511@RED-MSG-06 \
    --to=dsyme@microsoft.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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).