My go-to for testing simple JS is Adobe’s ExtendScript Toolkit. The ESTK (and
ExtendScript in general) uses an older version of SpiderMonkey (which supports
E4X).
It looks like the behavior there is different than what the JSFiddle shows.
Maybe it was a bug which has been fixed in more modern r
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 wrote:
>
>
> On 2/10/16, 1:50 PM, "Josh Tynjala" wrote:
>
> >Based on a quick test, a member variable on a class that is uninitialized
https://jsfiddle.net/yww51Lp0/8/
On 2/10/16, 3:22 PM, "Alex Harui" wrote:
>
>
>On 2/10/16, 2:47 PM, "Harbs" wrote:
>
>>One of the big use cases to use strict equality is with Numbers and
>>Strings when you want to exclude 0 and empty strings.
>
>Sure, but in my testing, checking against null wi
On 2/10/16, 2:47 PM, "Harbs" wrote:
>One of the big use cases to use strict equality is with Numbers and
>Strings when you want to exclude 0 and empty strings.
Sure, but in my testing, checking against null with "==" works just as
well if the type is known.
>
>The reason this came up now is
One of the big use cases to use strict equality is with Numbers and Strings
when you want to exclude 0 and empty strings.
The reason this came up now is based on my work with E4X.
If I’m reading the spec correctly, it differentiates between namespaces with
prefixes which are undefined and prefi
On 2/10/16, 1:50 PM, "Josh Tynjala" 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 def
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
Untyped variables are undefined by default. ActionScript does automatic
coercion when a variable is typed, so it becomes null for String or Object,
NaN for Number, or 0 for uint/int. Currently, this automatic coercion is
lost during cross-compilation.
On Wed, Feb 10, 2016 at 4:30 PM, Harbs wrote
I’m not sure about a point in the cross-compiler:
IFAIK, all uninitiated properties in typed ActionScript Classes are null. In
Javascript, uninitiated properties are undefined.
If I’m using strict comparison in cross-compiled ActionScript “myObj.someProp
=== null”, will that cross-compile corre