Thanks guys for the pointers, Clement I dont care about the VM my goal is not something like Slang but rather something that I will take a small piece of code in pharo lets say a few classes and convert it to C++ code that is human readable. But Esteban recommended to take a look at Slang anyway for what I want to create. My priority here is readable C++ code, rather than keeping the code as close to Pharo as possible. I know that compromises will have to be made, so no GC, static types etc. So I am looking into creating something that can take pharo code then the user adds annotations or extra syntax like types, pointers, manual memory managment, templates etc and then my compiler takes that and turns it to readable C++.
I think this approach would be much easier for me to do instead of doing the hard work of trying to map Pharo to C++ which most likely is not possible since C++ even lacks simple reflection and of course will have to implement my own VM and my own GC .
Essentially my goal is writing C++ with Pharo syntax or close to Pharo syntax. So people like me that want to take Pharo code and port it to C++ can do it easier than a manual rewrite.