namespace coflicts: local vs private symbols

new topic     » topic index » view thread      » older message » newer message

Hello Robert, all,

I may be addressing an old issue here but just a thought for future releases 
of Eu:  With the (relatively) new namespacing abilities of Euphoria you can 
differintiate (sp?) between conflicting global identifiers by using 
prefixes. I wish there were a similar way to identify local symbols in 
routine that has a private symbol of the same name. Here is an example 
program that doesnt work without renameing something.

sequence x
x = {0,0,0,0}
procedure p ()
	sequence x
	x = x + 1
	? x
end procedure
? x
p ()
? x

I would like to see:
{0,0,0,0}
{1,1,1,1}
{0,0,0,0}

I get this error:
variable x has not been assigned a value

I would prefer it check the local symbol for a value before returning an 
error. An alternate handling of this situation could require a prefix such 
as "local:" or something like that.

Just some thoughts here folks, any comments?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu