Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can .. be used instead #10

Closed
kenchris opened this issue May 16, 2015 · 5 comments
Closed

Can .. be used instead #10

kenchris opened this issue May 16, 2015 · 5 comments

Comments

@kenchris
Copy link

It looks more similar to . and Dart uses it as well.

Though it might be a problem with 1..toString()

@zenparsing
Copy link
Member

Technically we could use "..", but I don't think it's visually distinct enough. We want it to look pleasing, but obviously different from property lookup.

@zloirock
Copy link

.. more interesting as cascade operator (forced return this) like in Dart or LiveScript.

[2, 7, 1, 8]
  ..push(3)
  ..shift()
  ..sort(); // => [1,3,7,8]

@bmeck
Copy link
Member

bmeck commented Jun 15, 2015

Just remember that ... is the spread operator. Consider this:

[..other_fn_that_is_iterable]

vs

[...other_fn_that_is_iterable]

@rymohr
Copy link

rymohr commented Sep 10, 2015

Would have loved to use & over either of these but since that one's out my vote's for sticking with ::

Too much potential for confusion and I'd prefer to see .. reserved for ranges 1..10

@zenparsing
Copy link
Member

Agreed, let's stick with ::.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants