W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2005

[Bug 1610] New: don't environments behave like a stack? why not say so?

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Jul 2005 00:06:53 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DtDjB-00040b-Nr@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1610

           Summary: don't environments behave like a stack?  why not say so?
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: fred.zemke@oracle.com
         QAContact: public-qt-comments@w3.org


2.1.4 Notations for environments
It says "Also, note that there are no operations to remove 
entries from environments.  This is never necessary as updating
an environment effectively creates a new extended copy of the
original environment, leaving the original environment 
accessible wherever it is in scope along with the updated copy."
So which copy is used in case of a conflict?  Example:
an outer scope has a variable named $v and an inner scope 
creates a new variable named $v with a different value.  So 
which value is accessed?  I think the truth is that creation of
a new environment completely occludes the old environment,
so it is not true to say that both the old and the new 
environment are accessible.  I think
the behavior is actually a stack, and only the top environment 
on a stack is used.  When the scope that created the top 
environment exits, then that environment is popped from the stack,
bringing the outer environment back into visibility.
I think that expressing the behavior in this fashion would be
both more correct and more understandable.
Received on Friday, 15 July 2005 00:06:55 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:25 UTC