Re: Integer skip....

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

>Okay, forgive my ignorance but... I still don't see why the current scope
rules are a problem here.

Forgiven on forehand.

>Sure, if you're changing a large program so that all private uses of a
variable name are preceeded by "PRIVATE_", it will take a while; but then
again, so would changing that same program so that all *local* uses of a
variable name fit Euphoria's new local-scope-specific syntax. There's no
guarantee that the particular syntax would be the same--and carry the exact
same meaning--as in another language, even if it were introduced.

Im asuming Robert will at least add some 'auto-detection' as to what
variable is referred to, besides possible new syntaxes. Esspecially since
the namespace issue is more a 'bug'/'feature' than a bad chosensyntax. There
is nothing wrong wiht the syntax. If only there wasnt one huge global
namespace.

If file A does *not* include file B, then the identifers in file B should
not be available in file A, it sounds logical and it is. Currently its all
in one huge global namespace. Meaning if file C includes file B and file A
(in that order) the identifers from file B are avaiable in file A. Which
nobody asked for, or stated. File C has got nothing todo with the contents
and identifer uses of file B. In other words, one include file should not be
able to alter the namespace for other include files. Which is logical, since
you use those files to *seperate* different parts of your code, so when a
part works, it can not be influenced by or influence some other part.

>In each scope case, the routine (and writer of the routine) is expected to
know all variable names in the higher scopes; or if he doesn't, then he
can't access them anyway. So what's the problem with simply not naming
variables in a particular scope to conflict with anything higher?



"for local_file_first_loop_index = local_file_begincounter to
do"

I rest my case. And what if two include files both use the name FONT_ then
there would still be an issue, as to for all difference we care about, we
could have just renamed the file.

Ralf

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

Search



Quick Links

User menu

Not signed in.

Misc Menu