Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4 and class introspection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-06-11 (10:16)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] camlp4 and class introspection

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?

> 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

--      - EasyLanguage to C# translator  - Blog