So in every *other* programming language, we can add a simple function like Ruby's Hash#merge, and it's fine, and no one bats an eye. But in JavaScript, everyone gets ten times as excited, produces 100 times as much writing and discussion... and support for it is unpredictable.
Gotcha. Yeah, `&:` really seems like more of an artifact of methods being separate from properties. I've definitely wanted a better way to write the python equivalent of `map(this.some_func, xs)` in Ruby than `http://xs.map (&method(:some_func))`
-
-
Yep. And in Python there's also no good way, even though Python methods are perfectly fine objects. Which is (in part) why Python spells even the simple `http://xs.map (&:f)` as `[x.f() for x in xs]`.
- 3 more replies
New conversation -
-
-
One of the most bizarre results of syntax aversion is that they avoided adding fundamental syntax (most notably blocks), but ended up proliferating a lot *more* syntax that could've been avoided if they just had blocks.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.