-
Notifications
You must be signed in to change notification settings - Fork 0
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
Potential for reified Index
type
#6
Comments
Why would we need or want some kind of Noun? |
It's extremely convenient to be able to hold on to slices and relative indexes in variables and reuse them, which is why both C# ( |
@rbuckton Yes, I believe I've already expressed my support for your entire concept in that issue. This proposal merely aims to isolate and clarify the need for index-from-end, the capabilities required, and the design constraints, which can then be explained and encompassed by the more general mechanism you propose in your future proposals. I had thought that this would better demarcate the problem and facilitate progress. I thought it was in line with TC39's past practices, but unfortunately, I have failed. I'm not sure where the problem lies—perhaps it's a lack of ability on my part. I'm uncertain about what more I can do. Maybe your |
I mentioned this in tc39/proposal-slice-notation#19 as well, but there is potential to augment this in the future with an actual reified
Index
type, similar to C#, in a follow-on proposal to both this and slice notation, such that you could have a literal syntax for slices and index-from-end, i.e.:Please note this is intended as a discussion topic for a follow-on to this proposal. I primarily want to make sure we're thinking about this possibility as this proposal evolves.
The text was updated successfully, but these errors were encountered: