I've recently been switching over to === in my code, regardless of whether a variable is typed as * or not.
- Josh On Wed, Feb 10, 2016 at 2:28 PM, Alex Harui <aha...@adobe.com> wrote: > > > On 2/10/16, 1:50 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote: > > >Based on a quick test, a member variable on a class that is uninitialized > >will be undefined with the current JavaScript output. When a member > >variable is initialized, we currently output that in the constructor, but > >we don't output any fallback default values for uninitialized members. To > >me, that seems like it could be considered a bug. Uninitialized member > >variables should probably have default value (null, NaN, false, or 0, > >depending on the type). > > I agree is is a bug. I'm concerned about the performance implications of > initializing everything, though. Maybe when we get around to automatic > type conversion we need to let folks choose levels so they can trade off > performance. > > How many folks use “myObj.someProp === null” where someProp is not of type > "*"? I think I always use "==". Are you using "===" for speed reasons? > > Thanks > -Alex > >