First, I believe you mean:
this.set('foo', 1), or
this.set({ foo: 1 }) instead of
this.set('foo' => 1)
What I personally do is use "set" as much as possible. Seems more
"object-oriented" to me. If I am going to be doing LOTS of processing, then
I will assign/get properties directly because that will be faster than using
any custom javascript. I wish I had a more fundamental reason, but I suppose
to try and stick with a single convention will help and make code reusable
and maintainable.
Happy coding,
~Philip
On Tue, Oct 18, 2011 at 11:45 AM, Lee Goddard <[email protected]> wrote:
> Hi,
>
> 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 ?
>
> Mutator or dot-notation?
>
> I don't really know the MT source, and though the Java
> convention of public/private use (respectively) might
> be applied, I was wondering if there was a technical
> reason why one is better than the other.
>
> If anyone knows where in the source to look, I would
> be really grateful.
>
> TIA
> Lee
>
--
http://lonestarlightandsound.com/