Re: [sv-bc] declaration vs reference order issue

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Fri Sep 05 2008 - 14:54:59 PDT
Arturo Salz wrote:
> ... binding the same identifier in the same scope to two
> different objects makes no sense.

I believe the intent was to have each identifier's scope
begin at its point of declaration, and not before.

> How can users debug such situations? When users enter the multiply bound
> expression in their favorite debugger, which value is printed?

Names declared late in a block are no more "multiply bound" than any
name whose meaning is shadowed by a more nested declaration.
The value printed by a debugger should be based on a reference made
              /at the current breakpoint/.
I suppose some debugger systems would have to track code locations
at higher resolution than they do presently.
Absent that resolution, a debugger should just give the inner definition;
if you wanted the outer defn, that debugger will need a hierarchical reference.
The LRM doesn't standardize debuggers (AFAIK).

> I've understood "point of reference" to mean "the scope containing the
> reference", certainly not the lexical position of the reference.

Elsewhere (e.g. in wildcard imports from packages) the point of reference
has meant the exact lexical position of the reference, not its coarse-grain scope.

Greg


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Sep 5 14:55:56 2008

This archive was generated by hypermail 2.1.8 : Fri Sep 05 2008 - 14:56:38 PDT