2 ms·
> a function is not an object, not a datastructure that can carry data Wait, what? That's the definition of a closure. Most of this seems to boil down to the
by curveship 13y ago
> a function is not an object, not a datastructure that can carry data
Wait, what? That's the definition of a closure.
Most of this seems to boil down to the author saying "my programming brain was hardwired by Ruby, and I'm annoyed JavaScript is different." OK, I feel your frustration. As a reader, though, I'd far rather see a post from someone who has spent the time to become proficient in both ecosystems and can offer more considered pro/cons.
On one point, I'll agree: I wish Javascript had an easy way to say "referencing an undefined property of this object should throw an error."