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.0 required=5.0 tests=none 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 8AD4ABC69 for ; Mon, 11 Jun 2007 13:36:19 +0200 (CEST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5BBaIUE029807 for ; Mon, 11 Jun 2007 13:36:19 +0200 Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 1C3F3879; Mon, 11 Jun 2007 07:36:18 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 11 Jun 2007 07:36:18 -0400 X-Sasl-enc: s9s+wcxBa728Gd32b8nBJ9n/9QqxpLQXL2+VWDMfFtH8 1181561777 Received: from [192.168.1.10] (AMontsouris-753-1-1-122.w90-2.abo.wanadoo.fr [90.2.128.122]) by mail.messagingengine.com (Postfix) with ESMTP id E94D815601; Mon, 11 Jun 2007 07:36:16 -0400 (EDT) Date: Mon, 11 Jun 2007 13:36:09 +0200 (CEST) From: Martin Jambon X-X-Sender: martin@martin.ec.wink.com To: Joel Reymont Cc: Jacques GARRIGUE , jtbryant@valdosta.edu, caml-list@yquem.inria.fr Subject: Re: [Caml-list] camlp4 and class introspection In-Reply-To: <9D18E795-9FAA-4933-AB70-49EEF6D62581@gmail.com> Message-ID: References: <7C9995D9-AC11-4E7C-8477-25CA4B88A0F4@gmail.com> <20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp> <9D18E795-9FAA-4933-AB70-49EEF6D62581@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at discorde with ID 466D33B2.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 camlp:01 yaron:01 ocaml:01 annotation:01 ocaml:01 arrays:01 ocaml-like:01 camlp:01 syntax:01 doable:01 2007,:98 2007,:98 blog:98 wrote:01 On Mon, 11 Jun 2007, Joel Reymont wrote: > > On Jun 11, 2007, at 11:11 AM, Martin Jambon wrote: > >> - introduce a special kind of type definitions (like Yaron suggested), so >> that only these would generate Objective-C code. The big advantage is that >> you could add options. > > This is the approach that I like but I can't visualize what special kind of > type definition is. > >> For example, if an OCaml type has 2 equivalents in Objective-C, you could >> add an annotation to choose which one to use. > > What would this look like? Can you give me an example? json-static (there are others...) To export an (key, value) list from OCaml, you can choose a JSON object or a JSON array of arrays of 2 elements. >> It makes OCaml-like type definitions, which usually do not cover all >> possible type definitions and are not compatible with standard OCaml. > > Right, to be handled by Camlp4 only. I don't want the syntax to stray too far > from OCaml, though. > > There's much to learn for me here, how to extend the class definition in > Camlp4 to add bridging code, for example. I'm glad that it seems to be > doable, though. > > Thanks, Joel > > -- > http: //topdog.cc - EasyLanguage to C# translator > http: //wagerlabs.com - Blog > > > > > >