Skip to content

Heads up: (compatibility) rule for dictionary keys IList interface #1759

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

Open
iRon7 opened this issue Jan 7, 2022 · 3 comments
Open

Heads up: (compatibility) rule for dictionary keys IList interface #1759

iRon7 opened this issue Jan 7, 2022 · 3 comments

Comments

@iRon7
Copy link

iRon7 commented Jan 7, 2022

Just a heads up:
In the (near?) future, dictionary keys are going to support the IList interface.
This would mean that e.g. @($Dictionary.Keys)[0] can be simplified to $Dictionary.Keys[0].
see: #15843 Ordered Dictionary keys are not numerically indexable and linked .Net issue: #56835 OrderedDictionaryKeyValueCollection implement IList
This might lead to (downwards) compatibility issues, therefore a (compatibility) rule for this (future) enhancement could make sense.

@iRon7
Copy link
Author

iRon7 commented Jan 13, 2022

Follow up .Net issue: #63537 Implement IList interface for all collection keys

@StevenBucher98
Copy link
Collaborator

Thanks for calling this out @iRon7, just as an FYI, we are not building on the compatability rules at the moment but may in the future!

@iRon7
Copy link
Author

iRon7 commented Jan 19, 2022

Understood. I was also under the impression that it was about to be implemented for multiple collection keys but the initial request implementation appearently only covered the ordered keys, therefore I have created a new request: #63537 Implement IList interface for all collection keys.
Anyways, it will probably take longer than I originally expected before this is being released. I am fine if you like close this case, I am sure that I will remember to reopen it.

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

No branches or pull requests

3 participants