Re:Why Does “=” Mean Assignment?
by mazesc on Wednesday April 11, 2018 @07:07AM
(#16809862)
I could imagine by destructuring he means e.g. unapply in Scala: https://docs.scala-lang.org/tour/extractor-objects.html
[ Parent
| on HN ]
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.
Re:Why Does “=” Mean Assignment?
by fiddlerwoaroof on Wednesday April 11, 2018 @11:49AM
(#16812326)
Recent JS versions have it too:
> let {a,b} = {a: 1, b: 2}
> a
1
> b
2