Closed rymohr closed 9 years ago
Just to throw out another syntax option since I'm not sold on :: either (https://github.com/zenparsing/es-function-bind/issues/10).
::
// reads naturally when chaining / cascading getPlayers() &map(x => x.character()) &takeWhile(x => x.strength > 100) &forEach(x => console.log(x)) document.querySelectorAll("div.myClass") &find("p") &html("hahaha") // conceptually similar(ish) to address-of operator Promise.resolve(123).then(&console.log) $(".some-link").on("click", &view.reset)
Technically foo&bar is a valid variable name (foo::bar is not) but I haven't seen variables like that in the wild.
foo&bar
foo::bar
& cannot be used as it's already used by the bitwise and operator.
&
Doh. For some reason I thought spaces were required for that one.
Just to throw out another syntax option since I'm not sold on
::
either (https://github.com/zenparsing/es-function-bind/issues/10).Technically
foo&bar
is a valid variable name (foo::bar
is not) but I haven't seen variables like that in the wild.