On 5/18/07, Bret Pettichord <[EMAIL PROTECTED]> wrote:


There are consequences to including modules that people should
understand before they make casual use of it. You are collapsing the
namespace and you need to know that you won't create any unexpected
collisions when you do this. For example, i recently added a class
called Watir::Process, but there is also a standard Ruby library called
Process. You could break a library that uses the Process class (from
win32-process) if you mixin the Watir module into the toplevel context.

That's why using include is not an everyday Ruby practice, but rather
typically used to support mixins, rather than simply saving a few
keystrokes. I just don't think we should be teaching bad ruby practices
to Watir users. We already have too many users who don't realize that
Watir is simply another Ruby library. I'd like us to treat it this way,
instead of encouraging our own special (and dangerous)


Bret, thanks for spelling this out. After hearing your arguments I agree
completely.

Jeff


--
http://testingjeff.wordpress.com
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to