A good way would be to manage a config option that can desactivate Prototype's overload By default Prototype should work as it does actually so it is still compatible for thoose which already use Prototype and doesn't want to manage a configuration for it
Date: Tue, 10 Mar 2009 11:00:51 +0100 Subject: [Prototype-core] Re: Prototype and the global namespace From: mislav.maroh...@gmail.com To: prototype-core@googlegroups.com On Tue, Mar 10, 2009 at 02:52, Nick Stakenburg <nickstakenb...@gmail.com> wrote: > What's the big deal? Can anybody explain a concrete situation where you put > two libraries together and the browser goes up in flames? Has anybody really > got bitten by modules in the global namespace like Template or Hash? Mootools shares many of Prototype's globals. There's not much fun in porting Mootools code to Prototype or the other way around. I get this, and I agree on namespacing globals - it isn't going to affect our workflow, we'll just copy stuff from Prototype to global namespace for legacy scripts. (There will probably be a compat.js script that does that when the release is ready.) What I want is the community's opinion on augmenting native prototypes: Number, Function, Event etc. Is it good/bad? Is this what makes you happy while writing code? Here's the thing: Prototype and "LibraryA" can easily co-exist if LibraryA doesn't augment native prototypes;Prototype and "LibraryB" cannot co-exist if LibraryB augments native prototypes, too - high chances for name collisions. So augmenting native prototypes is OK if you're the only library that does it. If there are others, the situation produces sad pandas. Same problem with augmenting Object.prototype: we know that it hurts looping over properties, but suppose script writers got around looping problems -- what if everyone augmented Object.prototype? It would be a massive crash 'n' burn. Object.prototype is verboten. Should we say that augmenting native prototypes is verboten, too? If so, how should be re-brand the Prototype library? :)j/k Thanks,# Mislav _________________________________________________________________ Téléphonez gratuitement à tous vos proches avec Windows Live Messenger ! Téléchargez-le maintenant ! http://www.windowslive.fr/messenger/1.asp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---