Mainstream D Programming

Janice Caron caron800 at googlemail.com
Sun Oct 14 03:04:32 PDT 2007


On 10/14/07, Richard Geary <tristram at dial.pipex.com> wrote:
> Greetings!
>
>is there a D to C++ converter?

I'm not completely sure it could be done at all. For example, while

struct A(T,int N)
{
    /* whatever */
}

maps fairly straightforwardly to

template <type T, int N> struct A
{
    /* whatever */
}

the same is not true of

struct A(string s)
{
    /* whatever */
}

You would have a /really/ hard time translating that to C++. Static
if, compile-time functions, mixins and so on, all simply have /no/
equivalent in C++.

Anyway, what would be the point?



More information about the Digitalmars-d mailing list