From: brogoff@speakeasy.net
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] CamlP4 Revised syntax comment
Date: Mon, 28 Oct 2002 08:53:12 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.44.0210280836300.15482-100000@grace.speakeasy.net> (raw)
In-Reply-To: <20021028132054.V21127@verdot.inria.fr>
On Mon, 28 Oct 2002, Daniel de Rauglaudre wrote:
> I like the way Ada ends its statements. However, as said in the
> chapter about the revised syntax (tutorial), we took the option not to
> end the statements with a keywork ("end", or "fi" or things like
> that), in order to show that all of that is functionnal.
I mostly like Ada syntax too. It could use a few more characters, like []
for arrays and Pascalish ^ for access types; blame the Steelman requirements
doc, not Jean Ichbiah, for this!
As you point out though, Ada is far from functional so I don't agree that it
should be a model for an MLish syntax.
> When you see:
> if e1 then e2 else e3 end
>
> you don't have the impression that e2 or e3 are *results*: the "end"
> gives you the impression that everything is terminated. Often, newbies
> don't understand the functional way this statement must be read. If we
> change the syntax with this "end", it is going to be more difficult to
> explain then.
>
> This way, I regret a little bit the "do { }" of the "for" loop. A
> "do .. done" would have been more logical (same for "while").
I like having the sequencing syntax being the same with or without the loop,
but I certainly understand that there is a valid argument for seeing them
differently, since in a non-looping sequence you typically return the value of
the last expression.
I thought that do { } was a compromise, since some users just wanted {} or ()
to be the non-optional bracketing for sequences. I remember some of that
discussion, and I certainly wouldn't mind that solution, or the creation of
special non-alphabetic brackets for imperative constructs. I'm not fond of
do .. done myself.
-- Brian
-------------------
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-10-28 16:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 19:02 brogoff
2002-10-25 19:25 ` Oleg
2002-10-26 9:27 ` Stefano Zacchiroli
2002-10-26 11:19 ` Daniel de Rauglaudre
2002-10-26 17:38 ` David Brown
2002-10-26 19:27 ` brogoff
2002-10-28 8:38 ` Kontra, Gergely
2002-10-28 9:28 ` Oleg
2002-10-28 9:41 ` Florian Douetteau
2002-10-28 10:04 ` Stefano Zacchiroli
2002-10-28 12:20 ` Daniel de Rauglaudre
2002-10-28 16:53 ` brogoff [this message]
2002-10-28 16:56 ` Alexander V.Voinov
2002-10-29 18:15 ` Gérard Huet
2002-10-29 18:47 ` Alexander V.Voinov
2002-10-29 20:53 ` Damien Doligez
2002-10-29 21:30 ` M E Leypold @ labnet
2002-10-29 21:42 ` brogoff
2002-10-29 11:30 ` Pierre Weis
2002-10-29 16:48 ` brogoff
2002-10-29 17:20 ` Alessandro Baretta
2002-10-30 17:49 Arturo Borquez
2002-10-31 9:21 ` Daniel de Rauglaudre
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.44.0210280836300.15482-100000@grace.speakeasy.net \
--to=brogoff@speakeasy.net \
--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