On 6/25/07, Tobie Langel <[EMAIL PROTECTED]> wrote:
>
>
> > Class.include(Animal, Enumerable)
> > Class.alias(Animal, ...)
>
> How do you handle precedende handled between mixin and instance
> methods ?
Can you rephrase the question please?
> - no dollar-signs and underscores because they indicate bad design
> > (exceptions from this rule are $super/$parent)
>
> how so ?
Well, all those avoiding collisions stuff (uppercase, underscores, dollar
signs) is needed because we're mixing inheritance logic with users' code. We
should begin to ask ourselves is this what we should have done in the first
place? Simply moving inheritance logic to a lower level will remove it from
users' realm and the need for uppercase or underscores will disappear.
Remember: mixins and aliases are not so frequent. Yes, we want everything to
be convenient and easy for the user while defining classes, but jumping
through hoops to save them a few keystrokes for seldom used features is too
much.
I think the Class.create({Extend: Animal, ... }) syntax suggested earlier
> is interesting if we intend to go the magical property way.
Whatever we choose, my opinion is that we should have only one way of doing
stuff. So, either this or that API - no compromises, no both.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---