Re: Re: source-to-source translators
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Eric M. Hopper wrote: > On Thu, 2005-06-16 at 09:41 -0400, Stefan Seefeld wrote: > >>Can you be a bit more specific about what kind of 'ideas' to draw from >>that ? > > > The C++ template language is really a language all unto itself, separate > from, but also intimately related to C++ proper. It's a functional > programming language. The template arguments are the function > parameters. It's capable of creating C++ code at compile time by > reasoning about and re-arranging type information. > > In a sense, it does source (C++) to source (C++ again) translation of > templates to working C++ code. Sure, but what relevance does that have for source-to-source translation in the context of synopsis ? >>We seem to be talking about two different languages now. You are referring >>to the programming language itself, while I'm talking about a language to >>express code transformations with, i.e. 'meta-programming'. > > > No, I was talking about the template mechanism and its relationship to C > ++ as a whole. In a sense, its a meta-programming language for C++. Indeed, but I still fail to see the parallels to synopsis, as far as the language (syntax) is concerned. > I'm not sure how useful the ideas are for say, C++->Python translation. > But I think the example of C++ templates is still worth keeping in mind. What ideas specifically ? Regards, Stefan