| ▲ | mojuba 3 hours ago | |
Huh, I didn't know about `return` in `defer`, but is it really useful? | ||
| ▲ | ninkendo an hour ago | parent | next [-] | |
No, I actually misremembered… you can’t return in a defer. The magical thing I was misremembering is that you can reference a not-yet-defined value in a defer, so long as all code paths define it once:
Blame it on it being years since I’ve coded in swift, my memory is fuzzy. | ||
| ▲ | 2 hours ago | parent | prev [-] | |
| [deleted] | ||