Y
Hacker News
new
|
ask
|
show
|
jobs
by
m-ou-se
3209 days ago
C++ already had syntax for pulling out one member by name: ;)
const auto x = f().x1;
1 comments
faitswulff
3209 days ago
I'm not sure what the wink means, but I think gp might be talking about destructuring like what you'd find in Javascript:
> const {a, b} = {a: 'hey', b: 'there'} undefined > a 'hey' > b 'there'
link