|
|
|
|
|
by maccard
1582 days ago
|
|
I did think of this, but left it out of the original post to keep it shorter. It is functionally better, but in terms of reading code, I find it easier to keep initialization blocks together and linearly scoped; the optional branch means I have to actually figure out which branch is being taken. That's definitely in the personal preference area though I'd still rather a ternary over any of the above options though! |
|