So turns out tail call optimisation isn't that difficult after I implemented return. I have some WIP code, may finish it if I have time at lunch.

I'm not doing automatic optimisation (even if there's some semantic analysis). It requires tagging the function call in the return. So... syntactic tail call optimisation?

E.g. in fn we can have "return tailc fn(n);"

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko