Recommendations on porting Python to D
mw
mw at g.c
Thu May 23 13:26:01 UTC 2024
On Friday, 3 May 2024 at 17:53:41 UTC, mw wrote:
> On Friday, 3 May 2024 at 17:38:10 UTC, Chris Piker wrote:
>> On Thursday, 25 April 2024 at 16:57:53 UTC, mw wrote:
>>> [...]
>>
>> Thanks for the suggestions. I put the question aside for a
>> bit, but yesterday ran across a python transpiler here:
>>
>> https://github.com/py2many/py2many
>>
>> It already has support for C++, Go and others. Since I have
>> mountains of python code created over many years, maybe it
>> would be worth contributing to this project out of self
>> interest.
>>
>> Can you take a look at py2many and see what you think about
>> it? Getting D on the support list might be good.
>
> (Haven't checked its own implementation and output code
> quality.)
>
> But it says has output for Kotlin, Dart, these two languages
> are similar to D syntactically, so will be a good start.
I took another quick look of the project, it uses the Python
builtin `ast` module as parser, and visitor design pattern to
implement the transcompiler, so I think it's of decent quality.
HTH.
More information about the Digitalmars-d-learn
mailing list