Re: Remarks on SWI 7
Ulrich Neumerkel <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Jan Wielemaker: >A standard that _prescribes_ that length(2,0) should fail silently is >something I refuse to take seriously. So yes, it is another issue. On the other hand you leave out many list checks in many places - not even consistently - and sometimes add errors not described in the standard. Your main argument being (against checks), that these tests are so costly. So people cannot anticipate what will happen without trying SWI or studying its source code. Or they just od the right thing without ever getting errors. Within WG17 we try to find consistent and easily documentable behavior. In the case of length/2, there is no error for the first argument because say length(L,5) and L = [_,_,_,_,_] are often exchanged. Introducing an error here would void this equivalence. All this is summarized in a single line: p.p.3.2 Template and modes length(?term, ?integer) Saying, the first argument is completely unchecked, for the second there is a type_error(integer,_) In any case, you are exaclty illustrating my point.