Version française
Home     About     Download     Resources     Contact us    
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
>"or".

>> 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
>intuitive.
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 ->
end

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

Gergo
+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely@mcl.hu,  kgergely@turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

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