![]() | This is an archive of past discussions about Scope (computer science). Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
When this was split from the disambiguation page, I think a bit of material was lost. I've copied at least the definition of scope back to the disambiguation page. Otherwise, an excellent job of making the disambiguation page!
I wrote a new introductory paragraph and changed some things later on to make them consistent with my new introduction. I fear my prose may be awkward (scope is a tricky thing to talk about informally) but I think my facts are right. Edit away.
My intent in writing the new introduction was to make the definition of scope more about languages than about the practice or experience of programming, and in particular to clear the way for discussing both static and dynamic scoping in a single article. If this article is ever merged with the ones on static scoping and dynamic scoping, most of the concrete discussion may have to be moved, as it seems to be biased toward static scoping. Perhaps this should be made clear regardless.
-- Cjoev 22:27, 14 Apr 2005 (UTC)
just my oppinion: reference should be made to the object-based scoping model used in the language Self? I am not sure what this one is called exactly, but I have typically been using the term "object scoping". other possibilities could be "prototype object scoping" or "delegate scoping"...
rough: you have an object called 'self' (or 'this' in many languages), which may refer to 0 or more objects as delegates. attempts to access a slot not found in the current object results in a recursive search of all delegated to objects, and their delegates, and such forth.
note: I am new to wikis...
(supposed to write own date string? sorry, dunno what the username is so I just used my typical handle...). -- cr88192, Mon Apr 25 00:05:04 UTC 2005
ok, I understand now, sorry for all the edits...
ok, the rule also exists as a secondary scheme in javascript afaik (one can omit self and still access values in delegates). javascript by default uses lexical scoping for most things.
newtonscript is another example.
self link: http://en.wikipedia.orgview_html.php?sq=digital ID&lang=en&q=Self_programming_language
a few related languages: http://en.wikipedia.orgview_html.php?sq=digital ID&lang=en&q=Category:Prototype-based_programming_languages
sorry, off hand I don't have many good links. I still don't know what it is called.
misc: I have my own language as well, which also uses this model (as the default scoping). lexical and dynamic scoping are also present, just with lexical scoping more relegated to use in locals and construction of closures and such, and dynamic scoping for what uses it still has...
why I think it is cool: it is much looser than lexical scoping; it deals with the module issue much better imo; it maps over much better to a networked environment imo (or more like, one where nodes can interact and readily share code/data); imo it works better with persistent stores where only part of the environment is being saved; ...
of course, yes, imo lexical scoping is still quite useful, I just like it's use more being for local vars, tighter/more-complex code, and similar...
or such...
-- cr88192, Tue, 03 May 2005 11:46:53 +0000
© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search