caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] CamlP4 Revised syntax comment
@ 2002-10-30 17:49 Arturo Borquez
  2002-10-31  9:21 ` Daniel de Rauglaudre
  0 siblings, 1 reply; 23+ messages in thread
From: Arturo Borquez @ 2002-10-30 17:49 UTC (permalink / raw)
  To: Daniel de Rauglaudre; +Cc: caml-list

Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr> wrote:

>Hi,
>
>On Mon, Oct 28, 2002 at 09:38:04AM +0100, Kontra, Gergely wrote:
>
>> I really dislikes the do { } notation.
>> My suggestion is to use do end pairs, which is borrowed also from ruby.
>> And if we want more ruby-ish (ada-like?), the matching can be
>> match a with
>> | 0 ->
>> | n ->
>> end
>
>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.
>
>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").
>
>-- 
>Daniel de RAUGLAUDRE

I like and seems me a good compromise actual revised syntax,
also do { ... } is a good (and visible warning) that may be
side effects to care. No way to if ... else ... end as you
said it isn't FP (it is pure impertative style).
I prefer the revised syntax despite extra verbosity because
it overcomes some confusing situations of the official syntax.
(if with or without else, { and begin, } and end, the match
function ... among others).

Best regards. 

-- 
Arturo Borquez


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
-------------------
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


^ permalink raw reply	[flat|nested] 23+ messages in thread
* [Caml-list] CamlP4 Revised syntax comment
@ 2002-10-25 19:02 brogoff
  2002-10-25 19:25 ` Oleg
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: brogoff @ 2002-10-25 19:02 UTC (permalink / raw)
  To: caml-list

Skip this thread if syntax discussions don't interest you. 

    I was wondering what Revised users think about replacing comparison = with 
==, as in Haskell, and giving phys ref equality some other name? 

    Why? Well, = is overloaded in OCaml/Revised for both binding and  
comparison, and this change removes that overloading and uses a 
fairly common (C, Haskell, Clean,...) symbol == for equality. Physical 
reference equality should be used rather sparingly anyways so it is better 
perhaps that it not even be infix. 

    Besides the extra keystroke, I couldn't think of good reasons why not. 
Backwards compatibility is not much argument against changes in Revised 
syntax. 

    Another possible change along the same lines is having =/= or /= for 
inequality, which happens to look a little more like the mathematical 
symbol. 

-- 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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2002-10-31  9:21 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-30 17:49 [Caml-list] CamlP4 Revised syntax comment Arturo Borquez
2002-10-31  9:21 ` Daniel de Rauglaudre
  -- strict thread matches above, loose matches on Subject: below --
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
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

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).