Coming form other languages, double colons is used as a "static" thing, although we don't need (?) this convention in ES6 classes, and I agree it looks ugly anyway.
I wonder if here `:>` would work instead, because I'd personally find any other usage of the thin arrow `->` confusing * Regards * I personally see `->` as a shortcut for `function` On Tue, Oct 7, 2014 at 4:51 PM, Kevin Smith <zenpars...@gmail.com> wrote: > >> >> [1]:http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator >>> >> >> Problem is :: vs. just dot, and now you have two problems. I'm actually >> good with FP inside-out, could learn to love :: if we add it, but the main >> objection IMHO is two-problems. OOP means just dot. >> > > That reminds me: > > https://esdiscuss.org/topic/merging-bind-syntax-with-relationships > > I know, OOP wins and all, but the downside is that it puts all the burden > onto TC39 for defining a complete iterator API. The double-colon is a bit > nasty-looking, though... Maybe we should consider single-arrow? > > For example: > > import { slice, forEach } from "my-userland-iterator-lib"; > > gimmeIterator()->slice(10, 20)->forEach(x => console.log(x)); > > Or for private fields: > > import { makePrivate } from "private-fields"; > > const _x = makePrivate(); > const _y = makePrivate(); > > class Point { > constructor(x, y) { > this->_x = x; > this->_y = y; > } > } > > > In any case, I think a merged relationships (i.e. private fields) + > binding mechanism would be a *huge* win for the language. > > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss