[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: on waste-of-time arguments....



"John.Cowan" <jcowan@xxxxxxxxxxxxxxxxx> writes:

> Thomas Bushnell BSG scripsit:
>
>> I think you have it backwards.  7.1 is not the normative section, 2.1
>> is.
>
> So the formal stuff in section 7 is non-normative, and the informal stuff
> in sections 1-6 is normative?  I find that surprising, though not absolutely
> astonishing.  In particular, that means that a mismatch between the number
> of actual and formal parameters is allowed, as is + applied to a non-number
> and CAR to a non-pair?  These things are only forbidden in 7.2.

You have misread section 7.2 in these cases.  Nothing in 7.2 prohibits
arity mismatches nor type mismatches in the arguments to standard
procedures.  Implementations are free to assign meanings to these
expressions if they wish.  If you look at the definition of the
"wrong" auxiliary function, you will see that it simply maps error
codes to continuations in an explicitly implementation dependent way.

The standard does *not* forbid an arity mismatch or a type mismatch;
instead it explictly says that the behavior of such things is
implementation dependent.

The authors of R5RS clearly expected that 7 and 1-6 are two
presentations of the same information.  As it happens, however, the
lexical structure described in section 7 is more rigid than that
specified in 2 and 6.  Nothing in the text of R5RS says that 7 is to
be preferred to 2 and 6, nor does anything say the reverse.

Confronted with this inconsistency, I look for an interpretation of
the standard in which all the parts are saying something.  I conclude
that the formal lexical description in 7.1 is intended only as an
example, but not as a complete specification.  Under such an
interpretation, 7.1 does not become useless, it still plays a valuable
role.

But if by contrast I take 7.1 as normative, then the contrary text in
2 and 6 becomes meaningless.  Why would they have written what they
did if they meant 7.1 to be normative?  Why explicitly say that
certain things are permitted when they are not?

Thomas