r/ProgrammingLanguages • u/Pie-Lang • May 09 '26
Blog post The Namespace Problem
https://www.alialmutawajr.com/blog/post1
14
Upvotes
r/ProgrammingLanguages • u/Pie-Lang • May 09 '26
View all comments
Show parent comment
-4
u/Pie-Lang May 10 '26
Take this case for example:
If the closure captured
xat the definition-site instead of call-site, then1would be printed. That's not the behaviour that I want.As for your example of returning a closure. Pie currently captures the surrounding environment only if it's returned from/passed to a function.
This does work as expected in Pie!