Hi,

> Your link is actually arguing for use for non-strict equality…

I suggest you read the content at the link again [1] perhaps you missed the 
humour there.

So given you don’t want to use strict equality and inequality how do you want 
to handle this? Does everyone agree with that not using them despite just about 
all modern JS advice is to use them?

There is as alternative that will fix a lot of the performance issues (but not 
all) and that is to default Boolean, Numbers, Object and Strings to a sensible 
default rather than undefined. I’ve already done the work for Boolean and 
Numbers as not initialising these can causes other bugs. Are you OK for Objects 
and Strings to default to null as well?

Re concerns re increased size it seem the closure compiler handles this well 
and there is little or no size difference in the optimised JS produced. I’ve so 
far found it to be smaller by a fraction of a %.

I’ve also raised a JIRA re performance here. [2]

Thanks,
Justin

1. 
https://herringtondarkholme.github.io/2016/11/05/how-to-write-copy-paste-friendly-code/
 
2. https://issues.apache.org/jira/browse/FLEX-35330

Reply via email to