Re: Ann: SWI-Prolog 7.1.13
Carlo Capelli <[email protected]> Sat, 19 Apr 2014 12:06:26 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wz3romSgwk31LrG5FsNQW0zBzVUNWrqsAzeDTVShFJ9Ng@mail.gmail.com> |
2014-04-19 9:19 GMT+02:00 rlaanemets <[email protected]>: > Does the sematic issue come from the need to support nondet mode when the > Key > is unbound? As this has the usual (for anything that involves exceptions?) > order-dependent semantics: > > ?- D = _{ a: 1 }, X = b, get_dict_ex(X, D, 1). > ERROR: get_dict_ex/3: key `b' does not exist in _G2711{a:1} > > ?- D = _{ a: 1 }, get_dict_ex(X, D, 1), X = b. > false > > Anyway, I have never used get_dict_ex/3 with an unbound Key, never even > thought about that :) > > Now the question is: will the dot (.) operator keep throwing exception on > the missing key or is that going to be changed? The documentation for > http://swi-prolog.org/pldoc/doc_for?object=get_dict/3 says: > > "This predicate is normally accessed using the functional notation > Dict.Key" > > which hints that it might not. > > By the way, the comment on top of '.'/3 still looks wrong: > > http://www.swi-prolog.org/git/pl-devel.git/blob/dec32b691ac0ca322456a4734f7c01d908ce2d32:/boot/dicts.pl > > "fails if the first argument is not a dict or the second is not a valid key > or unbound" > > Not sure how many here use Kate but I also attempted to fix their warnings > for the Swi dict syntax: > https://bugs.kde.org/show_bug.cgi?id=333608 > > Just a curiosity: I use Kate' syntax highlighter in QtCreator, handy when modifying scripts attached - possibily - to resource files. bye Carlo > > -- > View this message in context: > http://swi-prolog.996271.n3.nabble.com/Ann-SWI-Prolog-7-1-13-tp14825p14838.html > Sent from the SWI Prolog mailing list archive at Nabble.com. > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > -------------- next part -------------- HTML attachment scrubbed and removed