Re: Nested functions - better example?

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...
katsmeow said...

The inner functions have access to the outer function's variables.

WHOAH! Alas not, since that would require a closure. Let me explain.

Bear in mind I've only just changed this, post-0.8.2, so all is not set in stone.

Alas yeas, it's why i wrote nested functions in Turbo Pascal on win3.0 way back when.

Of course, you can do it differently in Phix, doing so merely reduces (not eliminates, i suspect) the value in having such nests. I am not voting for or against it. Eu doesn't allow it either, and in Eu i'd just drop the "outer" and "inner" in their own include file to get fine-grained scoping, which i have done more than once. Not a problem.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu