Browse thread
[Caml-list] single-line comment request
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Frederic van der Plancke <fvdp@d...> |
| Subject: | [Caml-list] { ... } vs ( ... ) vs begin ... end |
> Brian Hurt <brian.hurt@qlogic.com> writes:
>
> > On Tue, 8 Apr 2003, Daniel Andor wrote:
> >
> >> On Tuesday 08 April 2003 8:04 pm, Brian Hurt wrote:
> >> > If we're going to be introducing gratuitous backwards incompatiblities,
> >> > can we please do it for something usefull? Like say replacing begin/end
> >> > with { and }.
> >>
> >> If I may be a beginner here: how does "begin ... end" differ from "( ... )"?
> >> In practice I've found them to be interchangable, but that could just be an
> >> accident.
No, that's by design AFAIK. I'm no longer using begin-end, because I like
punctuation to be light on the eye.
> >
> > At the linguistic level, not at all. At the text editor level, it's
> > easier in vi to jump to match braces than matching begin/ends.
You seem to have missed the difference between ( ... ) and { ... }, the
message you answered used the first form.
There's a big problem with introducing { ... } as synonymous for begin-end:
constructs like { a = b } become ambiguous and only the type-checker can
lift the ambiguity.
Frédéric vdP
-------------------
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