Talk:Scope (computer science)/Archive 1

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!

First, I don't think we need to mention the definition of a word scope. This is an English edition, so we can assume readers are English speakers and know what a word scope means. Second, it seems there are no much to say about scope other than stuff in cs, so scope in cs as a main article is fine. -- Taku 00:07, Aug 1, 2004 (UTC)
I don't suppose you've seen scope (disambiguation)? --ssd 03:17, 1 Aug 2004 (UTC)

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...

Sure, why not. I agree that an encyclopedia article on scoping should give a good sense of the range of possible scoping rules language designers have come up with over the years, particularly if they are used in more than one language. That's exactly the direction I hoped I could steer us in with my recent edit. So, two questions: (1) Is this rule from Self used in any languages besides Self? If it's just an idiosyncrasy of that particular language then I don't know if it belongs in a general article. (2) Can you point me to an online reference for Self so I can learn more?
Also, the language designer in me feels compelled to say: What a horrible rule! How could a language that works that way possibly be any good? Just a gut reaction... not that it makes a difference when it comes to including it in the article, of course.
Cjoev 15:16, 25 Apr 2005 (UTC)

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