Is it feasible to slowly rewrite a C++ codebase in D?

bachmeier no at spam.net
Wed Jun 20 19:37:12 UTC 2018


On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez 
Hermoso wrote:
> I'm specifically thinking of the GNU Octave codebase:
>
> http://hg.savannah.gnu.org/hgweb/octave/file/@
>
> It's a fairly old and complicated C++ codebase. I would like to 
> see if I could slowly introduce some D in it, anywhere.
>
> Now, as I understand it, I would need to begin with making 
> `main` a D function, because D needs to initialise the runtime. 
> Is this correct?

With respect to this part of your question, you might want to 
check out
https://dlang.org/spec/betterc.html

and especially the limitations
https://dlang.org/spec/betterc.html#consequences

It shouldn't take much to do this, but the limitations of betterC 
are not minor.


More information about the Digitalmars-d-learn mailing list