Hi
I have the following problem (here below in CCL and LW)
CCL:
marcoxa$ ccl AM I BEING LOADED? Welcome to Clozure Common Lisp Version 1.5-r13651 (DarwinX8632)! ? (ignore-errors (read)) foo::bar
NIL #<CCL::SIMPLE-READER-ERROR #xC48489E> ?
LWM:
CL-USER 1 > (ignore-errors (read)) foo: NIL #<CONDITIONS:PACKAGE-NOT-FOUND-READER 21BA3B93>
CL-USER 2 >
Other Lisps behave similarly. I.e. they don't agree on the type of the error that they need to generate.
Now, this is a specific case for me: having a consistent READER-ERROR-BECAUSE-THERE-IS-NO-SUCH-PACKAGE-THAT-THE-SYSTEM-KNOWS error signaled would simplify some code writing.
Doesn't anybody think that it would be a good thing to have a CDR suggesting an agreed upon extension of the CL standard ERROR/CONDITION hierarchy?
Cheers
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first.
Marco Antoniotti wrote:
Now, this is a specific case for me: having a consistent READER-ERROR-BECAUSE-THERE-IS-NO-SUCH-PACKAGE-THAT-THE-SYSTEM-KNOWS error signaled would simplify some code writing.
Doesn't anybody think that it would be a good thing to have a CDR suggesting an agreed upon extension of the CL standard ERROR/ CONDITION hierarchy?
+1
I have faced the same problem in the past, although on a different set of conditions.
Hello Marco,
Marco Antoniotti writes:
Doesn't anybody think that it would be a good thing to have a CDR suggesting an agreed upon extension of the CL standard ERROR/CONDITION hierarchy?
Definitely! While working on a portable implementation of the functions in the sequences dictionary I found that I frequently wanted more specific conditions to indicate that some sequence is not a proper sequence, that some values <start,end> are not valid bounding index designators, etc.
I would certainly consider contributing to such a CDR document, in particular in areas where I have already experienced the need for more specific conditions.
Take care,
On Tue, 28 Jun 2011 01:16:16 +0200 Robert Strandh strandh@labri.fr wrote:
I would certainly consider contributing to such a CDR document, in particular in areas where I have already experienced the need for more specific conditions.
It would also be nice to suggest behaviour for character encoding/decoding conditions and recovery restarts. In implementations supporting unicode streams for instance, UTF-8 decoding/encoding errors can happen inadvertently on streams with unicode external formats, and user code must be able to cope gracefully.
On Jun 28, 2011, at 11:57 , Matthew Mondor wrote:
On Tue, 28 Jun 2011 01:16:16 +0200 Robert Strandh strandh@labri.fr wrote:
I would certainly consider contributing to such a CDR document, in particular in areas where I have already experienced the need for more specific conditions.
It would also be nice to suggest behaviour for character encoding/decoding conditions and recovery restarts. In implementations supporting unicode streams for instance, UTF-8 decoding/encoding errors can happen inadvertently on streams with unicode external formats, and user code must be able to cope gracefully.
This is IMHO very complicated instead, for the simple reason that it seems to me that each implementation disagrees on the actual interface to UNICODE and UTF-8. IMHO what is needed before this is a "standardization" of UNICODE, UTF-8, etc features across implementations. Whether this is achievable or not it is a matter of debate.
-- MA
-- Matt
pro mailing list pro@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/pro
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first.
On 27 Jun 2011, at 17:47, Marco Antoniotti wrote:
Doesn't anybody think that it would be a good thing to have a CDR suggesting an agreed upon extension of the CL standard ERROR/CONDITION hierarchy?
I think this is a good idea, and would be of great practical value.
It may a good idea to use ISLISP as a starting point. ISLISP is more or less a subset of Common Lisp with an almost identical condition system, but has a defined condition hierarchy that is more detailed than that of ANSI CL. Although there are not a lot of ISLISP implementations around, I think it would be of value to try to be compatible with ISLISP in this (and other) regards.
See http://www.islisp.info/specification.html
Pascal
-- Pascal Costanza The views expressed in this email are my own, and not those of my employer.