D is our last hope

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Dec 20 14:01:00 UTC 2023


On 21/12/2023 2:38 AM, Siarhei Siamashka wrote:
>     Oh and GCC has rules around what compilers may be used to compile
>     GCC for distribution. So if D isn't already on a given target...
>     have fun with that.
> 
> Could you please clarify this statement?

 From what Iain has said that I remember, you can only use the last 3 
major versions in binary form to compile the next version. They are 
pretty strict.

That is all I know on the subject.

>     On the other hand our frontend is already marked up with
>     |extern(C++)|, and has manually maintained C++ headers for it.
> 
>     If only we could take advantage of that.
> 
> So now some sort of an ubeRc0ol transpiler from D to C++ is a magic 
> solution?

We already have it for generating headers.

```
   -HCd=<directory>  write C++ 'header' file to directory
   -HCf=<filename>   write C++ 'header' file to filename
```

It is incomplete, but there is enough there to see that it is in fact 
possible to do what I am suggesting and has quite desirable use cases 
outside of compilers.

This isn't a far fetched idea. It already exists.


More information about the Digitalmars-d mailing list