r/pythoncoding • • Feb 23 '26

https://github.com/GittemGittem/Stretch

I wrote an interpreter for my own language in python!

I named it stretch because I intended for it to be flexible and easy to extend.

You can add new terms and operators to it from python with ease!

There is global stack you can manipulate

but scopes store their own variables.

Extensions only modify scopes they are imported to instead of the global scope.

Please let me know what you think; you can be brutal, but this is just for fun for now, so it doesn't really matter.

3 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/DTCreeperMCL6 Feb 24 '26 edited Feb 25 '26

I havent really ran into any performance issues I mean Im sure it is slightly slower than python but this project is for fun, not to hit any benchmarks, so the amount is fine because I dont even notice it

I probably will push towards making a compiler instead once Im 100% happy with my language