Am I right understanding that
-
defis evaluated every time it gets accessed -
lazy valis evaluated once it gets accessed -
valis evaluated once it gets into the execution scope?
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.
Yes, though for the 3rd one I would say “when that statement is executed”, because, for example:
This gives
"b is null".bis never evaluated and its error is never thrown. But it is in scope as soon as control enters the block.