From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,NO_REAL_NAME autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id BEEEFBC69 for ; Sun, 15 Jul 2007 12:48:53 +0200 (CEST) Received: from resmaa04.ono.com (smtp.ono.com [62.42.230.12]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6FAmrkC013617 for ; Sun, 15 Jul 2007 12:48:53 +0200 Received: from [192.168.1.33] (83.36.163.218) by resmaa04.ono.com (7.3.118.8) (authenticated as tmp123@menta.net) id 4699B8340000D236 for caml-list@yquem.inria.fr; Sun, 15 Jul 2007 12:48:47 +0200 Message-ID: <4699FB8A.2020504@menta.net> Date: Sun, 15 Jul 2007 12:48:42 +0200 From: tmp123@menta.net User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: caml: camlp4 revised syntax References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4699FB95.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 syntax:01 camlp:01 integer:01 integer:01 exceptions:01 modules:02 caml:02 caml:02 revised:02 revised:02 string:02 seems:03 seems:03 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.