> I remember reading that one is better than the other,
> but, fatally, I don't remember which is which.....
> this.set('foo' => 1) or this.foo = 1 ?
You mean
this.set('foo',1)
right?
What kind of object is `this` in the example?
Moo does not extend the core JS Object, so a native object can't use
anything but dot- or bracket-notation. It doesn't have a setter from
the framework.
Other Moo-extended objects will have setters. It's advisable to use
them because they're "smart" (they will interpret some variables as
sensitive to browser bugs or gaps and will take measures to set them
safely and reliably).
I wouldn't call 'set' a mutator, either. It's an accessor (it's not
technically a setter like real language setters, since it's clearly a
userspace method.)
-- Sandy