caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: tmp123@menta.net
To: caml-list@yquem.inria.fr
Subject: caml: camlp4 revised syntax
Date: Sun, 15 Jul 2007 12:48:42 +0200	[thread overview]
Message-ID: <4699FB8A.2020504@menta.net> (raw)
In-Reply-To: <mailman.7.1184494090.1020.caml-list@yquem.inria.fr>

Hello,

First of all, thanks to all people who develops this language and 
related tools, and to people who supports them using it.

I decided to use it in several developments. When finished, the 
developed modules will be made public, if they are enough generic (best 
place to publish it?)

Two points still causing some troubles:

1) The internal integer coding:

It seems that an integer of value "x" is internally stored like "2x*1" ( 
x shift 1 or 1 ). That is a loss of performance, not only when doing 
calculations, but also, by example, when using the integer as index of a 
string character, ... . Usage of native-int doesn't improves the subject.

2) Syntax:

It seems better to use the camlp4 revised syntax than the usual one. The 
reason is, by example, to skip this kind of errors:

initial version:
a1;
a2;
a3;
...

change to forget all exceptions produced by "a1": next source is 
incorrect with normal syntax (at execution time), but correct with 
revised one:

try
  a1
with
  _ -> ();
a2;
a3;

However, the revised syntax has a paradox. An "if" statement is, usually:

if ... then (
...
) else (
...
)

while a "for" statement can be:

for ... do
...
done

or

for ... do {
...
}

but not the expected one:
for ... (
)

why not a "for" that, as "let", "if" or "value", applies only to the 
next statment (or grouped list of them)? Knows someone if it is very 
dificult to modify the syntax to accept this?

Thanks again.

PS: direct mail to this address is filtered. To skip the filter, add 
word "caml" to the subject of the mail.


       reply	other threads:[~2007-07-15 10:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7.1184494090.1020.caml-list@yquem.inria.fr>
2007-07-15 10:48 ` tmp123 [this message]
2007-07-15 11:42   ` unboxed scalars - was [Caml-list] " Basile STARYNKEVITCH
2007-07-15 13:16     ` Gerd Stolpmann
2007-07-15 17:50     ` Christophe Raffalli
2007-07-16 16:40   ` Richard Jones
2007-07-17  3:08   ` Jon Harrop
2007-07-21 11:31 ` dml tmp123

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=4699FB8A.2020504@menta.net \
    --to=tmp123@menta.net \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).