* [Caml-list] non-optional labels in signatures
@ 2014-04-21 21:30 Daniel Bünzli
2014-04-21 23:50 ` Jacques Garrigue
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Bünzli @ 2014-04-21 21:30 UTC (permalink / raw)
To: caml list
Hello,
This is certainly a question for Jacques Garrigue. I'm asking out of pure curiosity if there's a particular reason why non-optional labels in signatures don't have the ~ ? Is to save a keystroke ?
(I happen to make the error of putting them in signatures fairly often)
Best,
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] non-optional labels in signatures
2014-04-21 21:30 [Caml-list] non-optional labels in signatures Daniel Bünzli
@ 2014-04-21 23:50 ` Jacques Garrigue
2014-04-22 0:11 ` Daniel Bünzli
0 siblings, 1 reply; 3+ messages in thread
From: Jacques Garrigue @ 2014-04-21 23:50 UTC (permalink / raw)
To: Daniel Bünzli; +Cc: OCaML List Mailing
On 2014/04/22 06:30, Daniel Bünzli wrote:
>
> Hello,
>
> This is certainly a question for Jacques Garrigue. I'm asking out of pure curiosity if there's a particular reason why non-optional labels in signatures don't have the ~ ? Is to save a keystroke ?
This was actually a difficult choice.
In O’Labl (and in OCaml 2.99), there was no ~ in expressions either; a label was an identifier followed by a colon with no space.
However, in OCaml 3.00 we chose to be more conservative, and to preserve compatibility with type annotations (i.e. do not require to add spaces around the colon).
Since the conflict with type annotations was only for expressions, this left the question of what to do with signatures.
There the decision was mostly based on esthetics: a ~ after an arrow does not look good.
I don’t think that saving a keystroke was part of this decision.
Jacques Garrigue
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] non-optional labels in signatures
2014-04-21 23:50 ` Jacques Garrigue
@ 2014-04-22 0:11 ` Daniel Bünzli
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Bünzli @ 2014-04-22 0:11 UTC (permalink / raw)
To: Jacques Garrigue; +Cc: OCaML List Mailing
Le mardi, 22 avril 2014 à 01:50, Jacques Garrigue a écrit :
> There the decision was mostly based on esthetics: a ~ after an arrow does not look good.
> I don’t think that saving a keystroke was part of this decision.
Interesting. From a usability point of view I would now have preferred regularity of syntax, but I may be biased, I came to OCaml from Lisp...
Thanks for the story,
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-22 0:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-21 21:30 [Caml-list] non-optional labels in signatures Daniel Bünzli
2014-04-21 23:50 ` Jacques Garrigue
2014-04-22 0:11 ` Daniel Bünzli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox