Florian Gilcher wrote:
> ===
> # require "my_app3", :use => Merb::String
> 
> "hello_goodbye".camel_case #=> "HelloGoodbye"
> "hello_goodbye".camel_case(true) #=> ArgumentError
> ===
> 
> Making it externally controllable which class a file uses is at least 
> discussable. I don't like it, especially because it is not really 
> fitting in Rubys way of not seeing files as program units. Also, only 
> one parametrization can be in place at once, which smells like a source 
> of conflicts.

I see the namespacing more like adding an extra layer of indirection to 
calls so you can hook them without globally overriding them. So within 
the context of a file you're saying "I want to have a go at all methods 
called against String" and you can optionally then provide your own impls.

If it's the file scoping that seems odd, I don't see any reason why it 
couldn't be explicitly scoped. Something like:

use String => Merb::String do
   ... and in here all calls to String methods can be replaced by Merb
end

It could be argued that the file scope logic is a little too unbounded, 
certainly.

- Charlie