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
>
>
>
>
>
>