Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] CamlP4 Revised syntax comment
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kontra, Gergely <kgergely@m...>
Subject: Re: [Caml-list] CamlP4 Revised syntax comment
>It's an idea that is worth considering. It fits well with the consistent
>use of the other C like operators as "||" and "&&" and the disposal of

>> Physical reference equality should be used rather sparingly anyways so
>> it is better perhaps that it not even be infix. 
>I've seen somewhere the operator "===" for physical equality, infix
>obviously. It's not really diffused but seems to me that is really
I guess it was ruby.
If we are at changes:
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 ->

And end is already a keyword, so it doesn't pollute the namespace, and
the square bracket will remain to the lists.

BTW who cares about the keywords used by the language? Rather to use one
more keyword, than to use weird syntax...

((( this one is not so important
If we are at lists, the current syntax is between sml and prolog:
1) sml uses head::tail, so the :: operator is common
2) prolog uses [Head|Tail], so requiring bracket is common

So, "closing more structures" idea is closer to the prolog syntax, one
could use it, ok, | is used in other contexts, so it couldn't be a too
good idea.

I think this many changes is enough to release a new version with == and
=== included :-)

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email:,          |
|  URL:    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
Magyar php mirror es magyar php dokumentacio:

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: