From: ES Date: 2005-10-02T04:48:56+09:00 Subject: Re: ideas for an RCR: variable locality Eric Mahurin wrote: > I would like to start this thread with end goal being to create > an RCR to control variable locality in the language (or > determine that there is already a reasonable alternative). > > Problem: Within a method you can't reuse a variable name for a > local variable. Some changes in ruby 2 may help the issue, but > also hurt it in another way. > > Example: For performance reasons, I'm having my package > (grammar - generic parser), generate flattened (reduce > calls/stack depth) code. As long as each "method" (to be > flattened) is simple enough that it doesn't require local > variables I'm OK. But as soon one of these need a local > variable, I'm in trouble - that variable could step on the toes > of another including one just like it that it calls/flattens. Could you perhaps offer a reduced code example? Your problem description makes no sense (though probably due to fault of mine). > [snip solutions] E -- No-one expects the Solaris POSIX implementation!