Is there a reason that nested destructuring isn't ...
# language-evolution
q
Is there a reason that nested destructuring isn't allowed? I'd suggest making it for easier refactoring/dealing with nested POD classes.
1
w
Here’s an issue for this https://youtrack.jetbrains.com/issue/KT-4608 and a comment from @\elizarov from 3 months ago, so quite recent:
Position-based destructuring works great for small data classes like key/value pair in maps, index/value pair when you iterating over a sequence, etc. Use-cases, where it is needed in a nested way, exist, but they are quite rare, so we are not looking at this feature in our short-term plans.