On Feb 13, 2011, at 12:42 PM, Chris Eppstein wrote:

>> is it really that likely that your app is going to have a better use
>> for something like Symbol#matches than to get an ARel Matches node?
> 
> Case-in-point: the mongoid gem defines Symbol#matches. Libraries that do this 
> have a myopic view of the world.
> 
> Chris

Maybe. I see libraries doing this as not much different than ActiveSupport 
extending Object. So long as you're able to opt in or out (in MetaWhere, this 
is by choosing to use the gem -- in AR, it would be a configuration option) 
then there's no harm done. There are certainly plenty of use cases for mixing 
and matching ORMs for different backend data stores, but I would say that the 
person setting out to do so has some pretty compelling reasons for doing so, 
understands their libraries, and is more than capable of dealing with any 
potential conflicts such as this.

Some defensive coding by library authors (falling back to a pseudo-namespaced 
method in the event the other method is already taken, for instance) makes sure 
the functionality is exposed even in the event of a method name conflict.

This debate becomes largely a non-issue when we get module refinements, but in 
the meantime I can't help but feel an arbitrary stance against such things is 
throwing the baby out with the bath water.

(off topic: this discussion is good to see, as I will be taking it into account 
on the metawhere rewrite)


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to