flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FalconJX] null vs undefined
Date Wed, 10 Feb 2016 22:28:32 GMT

On 2/10/16, 1:50 PM, "Josh Tynjala" <joshtynjala@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

How many folks use “myObj.someProp === null” where someProp is not of type
"*"?  I think I always use "==".  Are you using "===" for speed reasons?


View raw message