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=0.1 required=5.0 tests=AWL,MAILTO_TO_SPAM_ADDR autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1CD06BC6C for ; Tue, 17 Jul 2007 05:50:27 +0200 (CEST) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6H3oQg7010504 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 17 Jul 2007 05:50:26 +0200 Received: from [80.229.56.224] (helo=beast.local) by ptb-relay02.plus.net with esmtp (Exim) id 1IAe4w-0004gF-3N for caml-list@yquem.inria.fr; Tue, 17 Jul 2007 04:50:26 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] caml: camlp4 revised syntax Date: Tue, 17 Jul 2007 04:08:27 +0100 User-Agent: KMail/1.9.7 References: <4699FB8A.2020504@menta.net> In-Reply-To: <4699FB8A.2020504@menta.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707170408.27586.jon@ffconsultancy.com> X-Miltered: at concorde with ID 469C3C82.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 trade-off:01 ocaml:01 syntax:01 camlp:01 emacs:01 ocaml:01 frog:98 wrote:01 integer:01 integer:01 caml-list:01 ints:01 int:01 On Sunday 15 July 2007 11:48:42 tmp123@menta.net wrote: > 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. This is a trade-off, of course. You can use untagged but usually boxed ints in OCaml via the Int32 module. > 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... Such misunderstandings disappear when you use auto indentation in emacs. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e