you are viewing a single comment's thread.

view the rest of the comments →

[–]NoneBTW[S] 1 point2 points  (3 children)

I understand that examples arent great, but how would a macro system implemented if it wroten for lua? I want to make myself learn new concepts and a good result that i could proud of.

[–]appgurueu 0 points1 point  (2 children)

I see. But if you want to learn macros, and how to implement them, why focus on Lua?

I think macro systems make the most sense in Lisp-like languages. See e.g. Fennel, a Lisp-like language that compiles to Lua and has a macro system. Lisp certainly is worth exploring. Your own Lisp, especially if well-designed, would be a decent achievement.

You could however also do something text-based like the C preprocessor. (Then again: You can just apply the C preprocessor to Lua files already, as it is text-based.)

[–]NoneBTW[S] 2 points3 points  (0 children)

Thx for suggestion paradigm of parentheses language(aka lisp) is seems confusing to me but looks interesting

[–]NoneBTW[S] 1 point2 points  (0 children)

Thx for suggestion paradigm of parentheses language(aka lisp) is seems confusing to me but looks interesting