You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding recursive macro support could transform Orion in a powerful language because :
Recursive macros woudln't be dependent on callstack because they would be translated directly in parsing step. I already see a way of implementing that : Tail call optimisation system.
Recursive macros would just transform some recursive code into simple iterative code.
(macro factorial (x) {
(if (= x 0) (return1))
(return (* x (factorial (- x 1))))
})
Regards, Thomas.
The text was updated successfully, but these errors were encountered:
Macros like that in an interpreted programming language wouldn't make that much sense in my opinion, because the preprocesor is actually a kind of interpreter, and macros like that would be actual functions. But I still can try to apply that to the recursive functions.
Adding recursive macro support could transform Orion in a powerful language because :
Recursive macros woudln't be dependent on callstack because they would be translated directly in parsing step. I already see a way of implementing that : Tail call optimisation system.
Recursive macros would just transform some recursive code into simple iterative code.
Regards,
Thomas.
The text was updated successfully, but these errors were encountered: