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:

   1. Prototype and "LibraryA" can easily co-exist if LibraryA doesn't
   augment native prototypes;
   2. 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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to