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 08:22:31 UTC

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

Harbs 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-461326232
 
 
   @aharui I originally agreed with your position, but I've bumped into lots of weird bugs due to booleans not being initialized. That includes "undefined" ending up in some of my XML instead of "false".
   
   Comparing two booleans is also not so uncommon. We're doing a lot of this in Spectrum: https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/src/com/unhurdle/spectrum/card/Card.as#L23 Manually typing !! should not be necessary in AS3.
   
   One of the big selling points of AS3 is runtime type safety and I think that we need to keep that as much as possible.
   
   booleans should definitely be initialized on the prototype rather than instances when possible to prevent memory inflation, but when initialized on the prototype, the expense of initializing them is practically free.

----------------------------------------------------------------
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