Why are there all these strange stumbling blocks in Julia?

I would write generally, without thinking much: return (; a, b, c, d) , then you can use it any of the multiple ways:

(; a, b, d) = foo(x1) # correspondence by name
c = foo(x2).c
e = foo(x3).[2]
f = foo(x4).[:d]
g, _, h, j = foo(x5) # correspondence by position
7 Likes