From: Chris Hecker <checker@d6.com>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] labels and optional arguments in 3.06
Date: Wed, 13 Nov 2002 20:57:08 -0800 [thread overview]
Message-ID: <4.3.2.7.2.20021113204718.031fa750@localhost> (raw)
In-Reply-To: <20021114123418O.garrigue@kurims.kyoto-u.ac.jp>
>Indeed, that would leave no ambiguity. So it might be ok to allow
>mixing labelled optional arguments in an otherwise unlabelled
>application, if there is no ambiguity on labels. But is it really
>worth a strange definition, when the workaround is just to add
>parentheses?
I appreciate your point here about compiler complexity, but I'd say the
answer is yes. The parentheses just add to the syntactic mess, they don't
help with it and make things clearer (which is the original point of
labels). It's preferable to just not use the labels than to bizarrely
parenthesize functions, I think. Imagine reading some code and looking at
a function call with parentheses like that, knowing that currying makes it
so there's no need for them if there were no labels. You'd have to stop
and think about what was going on. So, I'd say that's a readability
lose. It'd be better to just punt the labels and optional arguments
altogether, because at least then the code is "normal". But, that's a lose
too, since optional arguments are very useful. Plus, the ambiguity
wouldn't come up very often, so overall it's an intuitive win as well.
How hard would it be to implement this rule?
Chris
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-11-14 5:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-13 23:33 Chris Hecker
2002-11-14 1:05 ` Jacques Garrigue
2002-11-14 2:45 ` Chris Hecker
2002-11-14 3:34 ` Jacques Garrigue
2002-11-14 4:57 ` Chris Hecker [this message]
2002-11-14 8:23 ` Jacques Garrigue
2002-11-14 18:31 ` Chris Hecker
2002-11-15 1:09 ` Jacques Garrigue
2002-11-15 2:21 ` Chris Hecker
2002-11-14 7:40 ` Alessandro Baretta
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=4.3.2.7.2.20021113204718.031fa750@localhost \
--to=checker@d6.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