-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
map keys are case-insensitive only #2294
Comments
Ren-C started doing case-sensitive storage and allowing case-insensitive lookup around here: There are some semantic questions about what it means to do case-insensitive operations (lookup, removal, unions, whatever) in a map with multiple matches with different cases. It's not easy to serve two masters. I'd prefer things like that give errors than be random. (So calling it "Ren.resolved" is a bit of jumping the gun, but I would say that it can be done certainly as well as whatever Red does, if that's what the issue topic is.) |
Ren-C is than not compatible with Red, where setting/getting is still case-insensitive by default.
For setting using case-sensitivity, there is a
There is a wish for the |
At least on the surface of it, I prefer Ren-C's solution (as opposed to to using up a term like PUT for something like this). My angle is that it's better to have the user of a MAP! make a decision: They must decide whether they expect to be putting distinct forms of the same item into the map, yet expecting them to be fetched insensitively. If they have that expectation, they should canonize their data before they put it in. Then they only worry at insertion time. For whatever it is worth: I feel that the entire model needs a thinking over. Carl had an initial idea of a very "brick-like" system that used BLOCK! concretely--even so far as to use a HASH! to index a block for making it faster (while still looking very much like a BLOCK!). Because things like MAP! have these very "abstract" properties for serialization and usage, I've been wondering if there should be a very conscious shift away from teaching the casual use of such things. Instead, consider they are tools that are reached for only by large-scale applications that absolutely require them. And if in that process, they are allowed to become very "non-Rebol-like", that's not so bad. Some brainstorming on this matter of pushing "back toward concreteness": https://forum.rebol.info/t/block-and-object-parity-in-pathing-picking/1086 ...but it is "only a feeling" at this point. My concern is that Rebol is less pragmatically usable than JSON as an exchange medium--even when both sides are speaking Rebol--which makes me feel like a step back may be needed. |
In Rebol:
while in Red:
Isn't Red's version more useful?
The text was updated successfully, but these errors were encountered: