ThakeeNathees / pocketlang

A lightweight, fast embeddable scripting language.
https://thakeenathees.github.io/pocketlang/
MIT License
1.52k stars 78 forks source link

Metaprogramming, (hygienic) macros, compile-time evalution, own syntax #131

Open dumblob opened 3 years ago

dumblob commented 3 years ago

Any plans for metaprogramming, (hygienic) macros, compile-time evalution, own syntax, or alike?

I don't expect you to build a new XL (despite I'd totally love such endeavor) but still I have to ask :wink:.

ThakeeNathees commented 3 years ago

Currently, we're restricted by the single pass compiler to implement these features. Rewriting the front end is the most prioritized task in the future list. However, we have plants to support reflection and run time code evaluation now.

dumblob commented 3 years ago

Ok, so if I understand it correctly, the direction is not AOT (ahead of time) but rather runtime "metaprogramming". Correct?

ThakeeNathees commented 3 years ago

@dumblob As for now yes. And I'm quite a fan of C macros. I could write a pre-processor for pocketlang in the future.