On 10/26/05, chromatic <[EMAIL PROTECTED]> wrote:
> On Wed, 2005-10-26 at 20:29 -0400, Rob Kinyon wrote:
> > I would prefer to use roles as they're closed by default, leaving
> > "class" to be my powertool, if I need the power.
> I don't understand this desire; can you explain your reasoning?

If a role is an immutable class, that means that its internals cannot
be changed. Hence, the compiler can trust that it will be the same at
the end as at the beginning. Which means it's optimized. Which means
my objects run faster if I create them from roles than if I create
them from classes. And, given that this seems to be the sole
difference between them (mutability vs. immutability), why would I use
classes as my standard?


Reply via email to