Actually that fits well with what I was going to suggest: it seemed to
me that you did not have yet fully made up your mind what you want.
I doubt though that a lexical solution would be as useful as a
call stack scoped one.
Also, Charles, maybe implementation implications for lexical scoped
changes might be less dramatic but wouldn't they still impose a
performance penalty at runtime? I mean, the issue of checking would
not change whether it's dynamically or lexically scoped. And there
must be a penalty because of Ruby's dynamic nature, i.e. since it's
not compiled you cannot decide at compile time which version of a
method needs to be invoked. When I think about it it may even make
implementation more difficult, because then the set of current methods
changes even more (i.e. when you redefine a method in a namespace and
invoke that method from another method invoked in that namespace the
old definition would apply again; this also imposes the interesting
question if recursion with redefined methods is still possible... :-))
A lot of interesting problems to solve.
Kind regards
robert
···
2007/12/22, Stefan Rusterholz <apeiros@gmx.net>:
But I think I begin to see a thought mistake. I guess I have
to think about it a bit :-/
--
use.inject do |as, often| as.you_can - without end