Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRename { List, Dict, Set }.length to count #938
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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
added
the
request
label
Mar 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
|
I don't know. It seems like a fine idea, but I'm not convinced it is better than just adding |
Skinney commentedJan 21, 2018
List.lengthgives sounds like a getter, giving the impression that it is a constant time operation, when it's actual linear time. Renaming that function tocountgives a better impression of what the function actually does.The same applies to
DictandSet.Array.length, on the other hand, is a getter and constant time operation and should keep its name.