Mislav Marohnic' wrote:
> ...
> Actually, I like your "is" namespace a lot! But - would the name be 
> obtrusive? What if someone defines "is" variable in the global 
> namespace (on the window object), will closures save subsequent calls 
> to real "is" in the framework? ...
>
I love the "is" idea too.  Simple, unique, and prototypish.  And what 
about "Prototype.is"?  That reopens the general Prototype philosophy 
discussion associated with Prototype.Browser--I vote for 
Prototype.Browser and Prototype.is.  :)

Quoting Andrew Dupont regarding Prototype.Browser:
"
I am not against adding to the namespaces, but I want to make sure it's
done judiciously and carefully.  Note that typng
"Prototype.Browser.KHTML" is still easier than typing
"navigator.userAgent.test(/KHTML/)".  And while I don't think that
browser detection is something we should shy away from lest we
encourage bad coding practice... well, I don't think we should be
giving it first-class treatment either.  Putting it inside the
"Prototype" object sends the message that it's for Prototype's internal
use and isn't *necessarily* meant for public consumption.
"

Is this the official Prototype philosophy: "Properties of the Prototype 
objects are not necessarily meant for public consumption"?  If so, how 
literal do we carry that? (see http://prototypejs.org/api/prototype 
which documents the properties).  I think Prototype.Browser and 
Prototype.is would add value internally and publicly.

--Ken

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: 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/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to