Recommendations on porting Python to D
    Chris Piker 
    chris at hoopjump.com
       
    Thu Apr 25 16:54:27 UTC 2024
    
    
  
On Thursday, 25 April 2024 at 07:04:13 UTC, Sergey wrote:
> On Wednesday, 24 April 2024 at 22:07:41 UTC, Chris Piker wrote:
>
>> Python-AST to D source converter may already exist?
>
> Another possible way maybe is using C :)
> Python -> C -> D
> https://wiki.python.org/moin/PythonImplementations#Compilers
Thanks for the info, though I think going to a low-level language 
in the middle will make code that has almost no high level 
structure.  Converting that back in to class-style D would likely 
take a while, in which case a manual port is a better option.  
Both python and D offer garbage collection so going through a 
non-GC language first would probably obfuscate the intended 
structure.
Maybe converting this AST to another AST format and then using a 
D code generator would be a better route.
So backing up, are there any AST -> D source generators in 
existence?
    
    
More information about the Digitalmars-d-learn
mailing list