-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
consistent design of collections and their interfaces #50
Comments
This is the only example of this "dodginess" that I'm aware of. Set union is a different operation than adding an element to the set. At least, we should write down what the collections interface is, I believe it consists of methods
|
Awesome — writing down the interface is an excellent start. If that's the only dodgy API issue, then that's really good and this issue will be much easier to close than I anticipated. |
Here's a question: should we use |
That's a tough question. I guess the difference between an unassigned index and an out of bounds index is that you couldn't assign something to an out-of-bounds index even if you tried. What would the corresponding distinction for hashes be? Does using a key of the wrong type cause an "out-of-type" exception? Is that analogous to an out-of-bounds exception? |
Possible additions to this interface:
There are some other questions about how arrays fit the collections interface. I'm using We should take a vote or something on whether to use "x!" identifiers for mutating. Also note |
Another one: I'm not sure the method |
Yeah, I was considering making a spreadsheet of what various languages use for different operators and use that to try to pick the 1) best, 2) least surprising to the largest number of people. |
adding isdenormal() using contains() instead of has(String, Char), part of issue #50
Implement lower case conversion methods
…ovements custom-set: Additional hint & testsuite clean-up
Restore the missing pool live bytes reset during sweeping
The current interface to things like hashes and sets is pretty thrown together and dodgy. For example, you can't put a set into a set at the moment because
add(s::Set, s2::Set)
adds the contents of the second set to the first, rather than adding the second set to the first as an item.The text was updated successfully, but these errors were encountered: