You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/02/07 14:55:41 UTC

[GitHub] joshtynjala commented on issue #78: Assign to Boolean variable does not convert to true or false, breaking loose comparison with ==

joshtynjala commented on issue #78: Assign to Boolean variable does not convert to true or false, breaking loose comparison with ==
URL: https://github.com/apache/royale-compiler/issues/78#issuecomment-461453993
 
 
   > That includes "undefined" ending up in some of my XML instead of "false".
   
   I was just thinking to myself that this is also potentially an issue for JSON. You don't want to stringify a truthy/falsy value instead of real true or false.
   
   > Comparing two booleans is also not so uncommon. We're doing a lot of this in Spectrum:
   
   I was trying to think of some real world examples of comparing booleans, and inside a setter to avoid invalidation or dispatching an event is a perfect one! Pretty common, actually.
   
   > booleans should definitely be initialized on the prototype rather than instances
   
   Agreed. They're passed by value, so initializing on the prototype shouldn't be an issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services