Hey all,

On Tue, Aug 19, 2008 at 17:26, Jason Bunting <[EMAIL PROTECTED]> wrote:
> I think using aliases is nice, but your particular pattern of using MochiKit
> may not be the same as others, so I don't see a reason to change things. I
> rarely use the functions you mention, so their longs names are no problem
> for me.

I tend to agree. Even so, adding various aliases and shortcuts (i.e.
partial applications) to MochiKit only makes things complicated and
clutters the documentation. Functions like partial are there for a
reason, one of them being that it is super-easy for programmers to set
up their own aliases.

As for using $$('.classname'), getElementsByTagAndClassName will
probably give you better performance as the former "compiles" down to
a traverse of the DOM and applying "hasElementClass". For a long time
I've wanted to optimize the Selector module, adding caching of
expressions (to save on "compilation") and special handling of common
patterns such as just looking for class or id. Sadly, I lack the time
to invest in it and currently it won't do myself any good. :(
Furthermore, I suspect there will be support for CSS selectors in
Javascript in near-future browsers.

cheers,
Arnar

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

Reply via email to