Is there a good reason to allocate entry at all in this scenario? My guess is you’re doing it for demonstration purposes but it’s overly verbose otherwise.
Correct, this was for demonstration purposes, and I agree that in practice I'd just inline the call in this case. I'll tweak the examples to make this more clear, thanks! My actual code that prompted me to write this did 3 things with the entry variable.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a good reason to allocate entry at all in this scenario? My guess is you’re doing it for demonstration purposes but it’s overly verbose otherwise.
Correct, this was for demonstration purposes, and I agree that in practice I'd just inline the call in this case. I'll tweak the examples to make this more clear, thanks! My actual code that prompted me to write this did 3 things with the
entry
variable.