Overview
| Artifact ID: | 4efad712ae9d1e4730cfbc45bbf663d836eaeea6 |
|---|---|
| Ticket: | 3598385fffffffffffffffffffffffffffffffff
[dict exists] doesn't produce an error for non-dict values |
| User & Date: | pooryorick on 2012-12-31 23:12:22 |
Changes
- icomment:
Donal says he hasn't seen a compelling reason to revert. In the case that led to this report, a function wanted to assume that its argument was a dict, and when it wasn't, it took some development time to trace back to the fact that the "type" of the argument was invalid in the first place. Perhaps Donal could explain how "will this [dict get] work" is actually the operation of greatest practical utility. It seems to me that any programmer asking about the existence of a key in a dict would be surprised if that dict wasn't actually a dict, and would want to know about it via an error message in order to fix the problem in the program logic. Also, doesn't [dict exists], like the other [dict] commands, have to convert the value to a dict first, and at that point, wouldn't there be an opportunity to raise the standard "missing value to go with key" (I'm now used to that verbiage as meaning the dict is invalid) error? Regarding [string is...], maybe it should be promoted to [is], and given some mechanism for extension. But I digress.
- login: "pooryorick"
- mimetype: "text/plain"
- username: "pooryorick"