Preferences

I think that it's unfortunate they stuck with that example instead of the classic point class example for positional args. In general the positional destructuring is not great, but there are some cases where it is nice and readable. Because of that I'm glad it's not the default that all record classes get it.

    var (f, l) = person;
is gross and hard to understand.

    var (x, y) = point;
is simple and readable.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal