Yesterday I wrote an algorithm in typescript. This is the language that I am most familiar with.

Claude was able to port this to Go, apply some optimisation and increase the performance by 12 times.

I know enough Go to make sure it does what I want it to do. It was a one shot.

Writing something in language A and letting AI port it to language B works incredibly well. Language A provides a perfect definition for the model to work with. Much more exact than natural language ever could be.

Reply to this note

Please Login to reply.

Discussion

I like your concept! 🤌

I’ve been doing this a lot recently. I also ask for generating identical unit tests in both languages to help make sure the code is correct.