On Thu, 2009-09-03 at 06:15 +0300, Abdulaziz Ghuloum wrote:
> On Sep 3, 2009, at 6:02 AM, Derick Eddington wrote:
> 
> >             ;; Will Clinger hates record-type-descriptor because it
> >             ;; requires knowing whether the record type was defined  
> > via the
> >             ;; syntactic or procedural interface.
> 
> I don't understand this.
> 
> >                The below use is not
> >             ;; portable, because it's unspecified which interface a
> >             ;; particular implementation used to define &condition.
> 
> I don't think so.  &condition is a condition type as it says
> in the report, and condition types can only be defined using
> define-condition-type.  

But it's unspecified whether define-condition-type uses the syntactic or
procedural record definition interface.

> So, (record-type-descriptor &condition)
> has to return the rtd of &condition.

But record-type-descriptor is specified to require its argument to be a
<record name> which is specified to be an expand-time handle or run-time
value.  It's unspecified if a <record name> can be either or not.  The
record type defined by define-condition-type might be a run-time value,
while the <record name> defined by define-record-type and required by
record-type-descriptor might be an expand-time handle, which leaves me
not knowing if record-type-descriptor will work for &condition because
&condition might be a run-time value.

Here's a better example of the issue:

> (library (L)
    (export some-type)
    (import (rnrs))
    (define some-type
      (make-record-type-descriptor 'some-type #F #F #F #F '#())))
> (import (L))
> (record-type-descriptor some-type)
Unhandled exception
 Condition components:
   1. &who: record-type-descriptor
   2. &message: "not a record type"
   3. &syntax:
       form: (record-type-descriptor some-type)
       subform: #f
   4. &trace: #<syntax (record-type-descriptor some-type)>
> 

How/why are users supposed to know if some-type was defined via the
procedural or syntactic interface?

> >               So I
> >             ;; have to say, here's another example adding to my  
> > dislike of
> >             ;; record-type-descriptor.
> 
> Your last couple of dislikes were not very well founded. :-)

Hehehehe :)  I like flammable topics because they can reveal what
actually burns.

-- 
: Derick
----------------------------------------------------------------

Reply via email to