On the following answer to a previous question someone mentioned an “auto-casting bool”
I guess null has an auto-casting bool that is false. What is it, and what does the code that makes it look like?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The phrase “auto-casting bool” is a poor phrase someone used off hand. I believe what they mean is the internal
ToBooleanoperationOf special note is the if statement which calls
ToBooleanon the expression.I don’t know my way around the v8 source code but here is a search for
ToBooleanon the v8 repo.For reference v8 is the javascript implementation used by chrome and written in C++