Y
Hacker News
new
|
ask
|
show
|
jobs
by
mazesc
2990 days ago
I could imagine by destructuring he means e.g. unapply in Scala:
https://docs.scala-lang.org/tour/extractor-objects.html
1 comments
bogomipz
2990 days ago
Ah OK its a functional construct, this make sense. I have seen this in my brief exposure to Clojure. Thanks for the examples and links.
link
fiddlerwoaroof
2990 days ago
Recent JS versions have it too:
> let {a,b} = {a: 1, b: 2} > a 1 > b 2
link