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

Rename { List, Dict, Set }.length to count #938

Closed
Skinney opened this Issue Jan 21, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@Skinney
Contributor

Skinney commented Jan 21, 2018

List.length gives sounds like a getter, giving the impression that it is a constant time operation, when it's actual linear time. Renaming that function to count gives a better impression of what the function actually does.

The same applies to Dict and Set. Array.length, on the other hand, is a getter and constant time operation and should keep its name.

@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Jan 21, 2018

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot commented Jan 21, 2018

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@evancz evancz added the request label Mar 7, 2018

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Mar 7, 2018

Member

I don't know. It seems like a fine idea, but I'm not convinced it is better than just adding O(n) to the docs on things. Overall, do not want to track requests in issues though.

Member

evancz commented Mar 7, 2018

I don't know. It seems like a fine idea, but I'm not convinced it is better than just adding O(n) to the docs on things. Overall, do not want to track requests in issues though.

@evancz evancz closed this Mar 7, 2018

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