3 ms·
Yes. The meaning of symbols within a closure can't change after creation. They are always bound to the same variable. In Io, the meanings of symbols are dete
by richcollins 17y ago
Yes. The meaning of symbols within a closure can't change after creation. They are always bound to the same variable.
In Io, the meanings of symbols are determined when the block is activated.
- stcredzero 17y agoI'll have to take a look at Io. I was just thinking of making contexts into semantic contexts by having users specify what the verbs mean, not just the nouns.
- richcollins 17y agoIo has no "nouns" or keywords. Everything in Io is a verb (a message send). Also, see http://news.ycombinator.com/item?id=630906 http://news.ycombinator.com/item?id=630906
- stcredzero 17y agoA "getter" is just a synonym for something that's a noun.
- stefano 17y agoIsn't this similar to dynamic scope?
- richcollins 17y agoSimilar but not the same. With dynamic scope, the variable lookup is performed up the chain of environments that the function was called in. The only way that you can influence this is by calling the function within a certain scope, you can't explicitly set the scope so it isn't as flexible as Io's scope and it isn't as fast as the lexical scope of most Lisps.