Archived

This forum has been archived. Please start a new discussion on GitHub.

Implementing New Language Mappings

Hi,

I'm interested in using Ice in some of my own projects. Unfortunately, I'm a major linguaphile and thus have some concerns about what is involved with producing a new language mapping. I assume you wouldn't provide mappings for so many languages unless it was fairly easy; on the other hand, I notice that not all of the language mappings support all of the features of the C++. In fact, the PHP support seems to be extremely limited, and (at the moment) Python seems to be missing some interesting features like IceBox and Freeze.

So, here's what I'd like to know:

1. What features must be present in a language to implement ICE support? For example, I often use REALbasic at work, but it doesn't support modules or named scopes as used in Slice and the ICE-supported languages. Does this disqualify RB for ICE support altogether, or simply complicate the process? I also note that native threads are necessary for server support. This is the kind of information I'd like to have.

2. When implementing support for a new language, what process do you use? I have read elsewhere that the first thing to do is develop a Slice to Language X mapping. I see that the code is full of robust tests, so I assume there is a certain order in which features are brought into a language mapping. I don't want to tread on what may be a trade secret, but it would be most helpful if you could illuminate in broad strokes the steps taken to produce a new mapping.

Thank you very much for your time,

Comments

  • FusionGyro wrote:
    1. What features must be present in a language to implement ICE support? For example, I often use REALbasic at work, but it doesn't support modules or named scopes as used in Slice and the ICE-supported languages. Does this disqualify RB for ICE support altogether, or simply complicate the process? I also note that native threads are necessary for server support. This is the kind of information I'd like to have.

    If you don't have modules or named scopes, you have to use name mangling.
    For example, a module Inner inside a module Outer would map to something like Outer_Inner.
    2. When implementing support for a new language, what process do you use? I have read elsewhere that the first thing to do is develop a Slice to Language X mapping. I see that the code is full of robust tests, so I assume there is a certain order in which features are brought into a language mapping. I don't want to tread on what may be a trade secret, but it would be most helpful if you could illuminate in broad strokes the steps taken to produce a new mapping.

    I honestly don't have a good answer for that. I just go and look at each Slice construct and how I would best map that within the language I'm targeting. No trade secrets here. Just look at Slice, at our target language and what it can do, and come up with the best API you can think of to make each Slice construct to use as easily as possible.

    Cheers,

    Michi.