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 21:31:01 UTC

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

Harbs edited a comment 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-461602920
 
 
   > `b.c=0;` // b is 'a.prototype'
   
   I assume you mean `b.c=!1`
   
   It's not just `==`. You'd also need to do `bool1 = !!bool2` for every single assignment because you never know if bool2 was initialized.
   
   XML and JSON are two examples of cases where undefined produce undesired results. There's probably more.
   To me the "cost" is more the memory consumption than the cost in code, but cost in potential bugs outweighs both of those.
   
   I don't understand what you mean with backing variables, but that doesn't sound free either.

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