Dan, check out my blog: http://www.someelement.com - I have only 2 relevant
posts, but in both of them I discuss some things that you may find
interesting about implementing a classical model in javascript, without
sacrificing the power of being able to "do what you want when you want" that
javascript gives. Namely, using a true private/public method model...

You're right though, experienced js programmers expect to have to track and
correct scope issues manually, and IMHO it's not that hard... and if this
starts being handled automatically you lose flexibility, as mentioned, for
edge cases.

On 5/11/07, Dan Webb <[EMAIL PROTECTED]> wrote:
>
>
> > > I wasn't being very clear -- sorry.  Those first two examples
> > > illustrate what would happen if we implemented *both* the stuff in the
> > > events branch as it is now *and* Dan's proposal to bind class methods
> > > automatically.
> >
> > Right! It is exactly where the magic bites.
>
> Heh, maybe your right.  I think, as a JS programmer, that having to
> bind functions manually is what you expect to do but as a beginner it
> isn't but I suppose there's no point in confusing matters for
> experienced JS programmers.  In the example here (where this is
> normally the element but if you pass in the a Class instance its bound
> to the object) I quite like how it works actually but each to their
> own.  I still think it would be nicer if Class.create() actually
> created something that acted like a class from a class based language
> rather than just being a normal contructor.
>
> On that point about base: base.js doesn't bind methods but it does
> wrap every method to allow access to its super classes version of the
> method which is going to introduce even more of a performance overhead
> but hasn't been a problem in my experience.
>
> >
>


-- 
Ryan Gahl
Principal, Manager
Nth Penguin, LLC - Consulting
http://www.nthpenguin.com
--
Software Architect
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform
--
Inquire: 1-262-951-6727
Blog: http://www.someElement.com

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to