Overview
| Artifact ID: | b04bd0b6cc4361dd380cbe3d5d67e3d2e54487a5 |
|---|---|
| Ticket: | 3598385fffffffffffffffffffffffffffffffff
[dict exists] doesn't produce an error for non-dict values |
| User & Date: | dkf on 2012-12-26 07:12:31 |
Changes
- icomment:
When we had it the other way, people also grumbled. Right now, [dict exists] answers the question "will this [dict get] work?" and that is the operation of greatest practical utility. The problem is that when you get into nested dictionaries, the cases become extremely difficult to tell apart. At the C level, I can tell that the lookup fails. I can't tell the deep reason why this is the case: did someone get the path wrong, or did they get the value wrong in the first place? Two cases (according to whose mistake it was) that you might possibly want distinguished, but the information to do that isn't there with the type of type system that we have. All we have is that it didn't work (with potentially some information in the error that *might* track it down, if it is from a useful perspective; that's the info that is dropped in [dict exists]). I suppose the error message "missing value to go with key" could be improved.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"