> It's not a bad cause, I just think the solution is a performance eater. > Imagine: the loop runs on every object instantiation. It wraps every > function inside another and it needs $A for that. After that, every function > call internally calls another, triggering $A one more time. To me it's a > terrible waste considering the total number of objects and their respective > instance method calls. And for what, solving event handling gotchas? Surely > we could do some implicit binding only in places where it makes sense (for > instance in the Event or Ajax modules for some operations).
Yeah, your right on that point. It was my main concern. It could be streamlined a fair bit though (getting rid of $A would be fine) and I wondered how many classes that are created with Class.create() really get instantiated in a typical project. I'm interested to see the impact it does have...I'll write some tests. I think you're right though, it's probably not going to be worth the performance hit. Saying that, I use base.js quite a bit which wraps functions in quite a bit of code and I've not noticed the performance hit. Having scope stuff in observe is a very worthwhile and for the sake of compatibility with new versions of JS you should be able to pass an optional scope as the final argument to all of the enumerable functions. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
