In JavaScript, currently, [ ] consistently has the semantics of property access (not just array access). This proposal gives them a second usage, as a way to create slice, based on whether the contents of the brackets contains a colon. I think we should be careful about this--it might lead to confusion. I wonder if some other tokens might be more appropriate here, even though it'd be unfortunate to move away from the convention that we have from Python and CoffeeScript.
In JavaScript, currently,
[]consistently has the semantics of property access (not just array access). This proposal gives them a second usage, as a way to create slice, based on whether the contents of the brackets contains a colon. I think we should be careful about this--it might lead to confusion. I wonder if some other tokens might be more appropriate here, even though it'd be unfortunate to move away from the convention that we have from Python and CoffeeScript.