Re: rant // OE scope \\ forked out of 500 Rosetta

new topic     » goto parent     » topic index » view thread      » older message » newer message
_tom said...

which explains why there are thousands of programming languages.

Another explanation might be that most of them are rubbish! (especially the famous ones?)

_tom said...

Is there a good reason for having separate scopes for each branch?

It reduces the area of code that you have to scan in order to decide whether a variable has already been declared.
I cannot think of any advantages to scopes across branches, when moving the declaration just above the opening if is what I might call "close enough".

_tom said...

Having trouble decoding this.

  • ? N-OO

"several hundred".

_tom said...
  • ? example shows if you mention "routine"

You lost me there

_tom said...

Is your example suggesting you want to create a global w or a global W from an if branch?

Not at all. I should really have said:
The expense of modifying a compiler to support local scopes cannot be justified if all your routines are small enough to fit on one screen.

I was not suggesting removing any features from OpenEuphoria or Phix, but rather accepting the decision not to add them to Orac.

Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu