In which use cases does one use the other similar scope functions instead of let, like run or also, or even with?
1 Answer
There is no right answer. It's a judgement call. Choose the one that best fits your situation whether you want this or it available internally, and whether you want to return the lambda result or the value of the object you called the scope function on.
1 Comment
Amit
Thanks for the answer Adam. I think both the points bring clarity: 1. whether you want
this or it available internally 2. whether you want to return the lambda result or the value of the object
letfor general use cases like executing some logic on non-null objects and such. Finally IMO, the new-comers might find this info useful.