Talk:First class environments: Difference between revisions

explain, please
No edit summary
(explain, please)
Line 6:
::::: A dictionary encapsulates keys and values (must be explicitly accessed/fetched), but not variables and their values (transparently changing the behavior of the code).--[[User:Abu|Abu]] 06:00, 1 July 2011 (UTC)
::: No, nothing to do with objects. Objects encapsulate code and data. Environments encapsulate variables and their values (closures minus code).--[[User:Abu|Abu]] 06:00, 1 July 2011 (UTC)
:::: What are variables other than references to data and/or code? And, if it's that variables have mutable names (which would not actually the case in many compiled languages), how is a variable name any different from a dictionary key? Using different words does not make the concept different -- you have to spell out the differences or illustrate them with examples. --[[User:Rdm|Rdm]] 10:54, 1 July 2011 (UTC)
 
Concerning the question whether the C solution "fits the spirit": I would say yes, though instead of switching the pointers to 'sec' and 'cnt' I would save and restore the actual values. This would better simulate the "binding" of the "environments".--[[User:Abu|Abu]] 15:17, 30 June 2011 (UTC)
6,962

edits