You didn't get warnings when mixing undefined with Number or String?
Maybe you should...
-Alex
On 6/24/17, 1:11 PM, "Harbs" wrote:
>Here’s a possible counter-argument to what I just wrote:
>
>undefined can be a functional change to ActionScript code when adding to
>numbers and strings:
>
>var o
Hi,
> undefined can be a functional change to ActionScript code when adding to
> numbers and strings:
>
> var obj:Foo;
> trace(1 + undefined); NaN
> trace("hello " + undefined); //hello undefined
> trace(1 + obj); //1
> trace("hello " + obj); //hello null
> trace(1 + null); //1
> trace("hello "
Hi,
> I have never seen real world ActionScript code which uses strict equality for
> null.
Remember we are also cross compiling to Javascript as well.
As as I see we have a choice between using strict equality or initialising
Objects and Strings but you want neither?
If there’s a performance
HI,
> Assuming the numbers are really indicative, you’ve just shown it to be no
> significant increase in performance. It’s also quite possible that the
> browser is optimizing some of the checks away.
It show significant permanence increase in Chrome on mac and windows and in
Safari.
> You m
Here’s a possible counter-argument to what I just wrote:
undefined can be a functional change to ActionScript code when adding to
numbers and strings:
var obj:Foo;
trace(1 + undefined); NaN
trace("hello " + undefined); //hello undefined
trace(1 + obj); //1
trace("hello " + obj); //hello null
tra
I have never seen real world ActionScript code which uses strict equality for
null.
The argument to use strict equality “because of modern js advice” is not a
reason to use it in ActionScript. The whole argument is to avoid unexpected
type conversions. If you are dealing with typed variables, t
Not unless you can demonstrate there’s a good reason to do so. I have yet to
see that.
> On Jun 24, 2017, at 5:45 AM, Justin Mclean wrote:
>
> Are you OK for Objects and Strings to default to null as well?
Thanks.
Assuming the numbers are really indicative, you’ve just shown it to be no
significant increase in performance. It’s also quite possible that the browser
is optimizing some of the checks away.
There’s no way that a performance difference of less than a microsecond (one
way or the other)
I'm +1 on changing to null by default on objects and strings. I know this
will improve compatibility with real world ActionScript code that expects
null. We can include these in the compiler option to default back to
undefined, for anyone that prefers that behavior.
- Josh
On Jun 23, 2017 7:45 PM
Justin,
Definitely I will wait couple of days.
Piotr
-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context:
http://apache-flex-development.247.n4.nabble.com/Re-git-commit-flex-asjs-refs-heads-tlf-Reverted-strict-equality-tp62526p62591.html
Sent from the Apache F
Hi,
> Again I’m in rush.
Sorry mean to say “Again I’m not in any rush."
Thanks,
Justin
Hi,
> Thanks for raising jira, I will revert develop soon.
There’s no rush we can see if anyone has an option on it. I’ve not tested in
the change in the SDK yet. Just want to show that it improved performance first.
> I hope we will find solution which will not break any changes in apps.
On
Hi,
> It is default swtich on as I understand ?
No you use it to turn initialisers off.
if you don’t use the compiler option then uninitialised Booleans will default
to false and Numbers will default to NaN. This is different to how the current
compiler does it.
if you do use it then initiali
Hi Justin,
Thanks for raising jira, I will revert develop soon.
After tests only Chrome ans Safari on Mac seems to be faster, but those
changes. I hope we will find solution which will not break any changes in
apps.
If you are saying that setting null to Object and string is performance
helpful
It is default swtich on as I understand ?
Thanks,
Piotr
-
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context:
http://apache-flex-development.247.n4.nabble.com/Re-1-2-git-commit-flex-falcon-refs-heads-initializers-make-default-initialisers-configurable-tp62583p625
Hi,
> Is this mean that if this property is true in config and I set my boolean
> property to false it will be ignored ?
No.
If you do this it will be false.
var prop:Boolean = false;
If you do this it will be true.
var prop:Boolean = true;
If you do this:
var prop:Boolean;
it will be false a
Hi,
So I’ve just checked in a compiler option to turn the initialisers for Number
and Boolean off just is case you want to optimise this in other way.
If there are no objections or further suggested changes I’ll merge into develop
next week sometime.
YMMV but once merged if you do turn them of
Hi Justin,
Is this mean that if this property is true in config and I set my boolean
property to false it will be ignored ?
var myProperty:Boolean = false;
When I trace it I will see:
undefined
Piotr
2017-06-24 10:46 GMT+02:00 :
> Repository: flex-falcon
> Updated Branches:
> refs/heads/in
18 matches
Mail list logo