[R6RS] safe and unsafe; declarations
sperber at informatik.uni-tuebingen.de
Mon Feb 27 13:07:58 EST 2006
Thanks for writing this up! After the first reading, I like most
everything of what you wrote.
William D Clinger <will at ccs.neu.edu> writes:
> <priority> --> 0 | 1 | 2 | 3
Is there any special reason why there are four? I understand the need
for at least three. Is the intention that this set might be extended?
> <typespec> --> #t
> | number? | complex? | real? | rational? | integer?
> | exact? | inexact? | fixnum? | flonum?
> | (< _ <bound>) | (< <bound> _) | (< <bound> _ <bound>)
> | (<= _ <bound>) | (<= <bound> _) | (<= <bound> _ <bound>)
> | boolean? | symbol? | null? | pair? | list?
> | char? | string? | vector?
> | input-port? | output-port?
This worries me for various reasons---most of all because the set of
type specs doesn't seem to be extensible. The rationale would be
clearer if only "primitive types" (i.e. the types without which there
is no semantic core) were included, but ports seem a bit misplaced
I would appreciate if the speed-oriented implementors (you or Kent)
could give us some idea of how important type declarations are for
generating good code. (I do understand that these declarations have
other uses, but they seem to be designed primarily to achieve speed.)
I don't really have a good intuition---Bigloo seems to rely on them a
lot, but I don't see anything offhand in the Chez manual, for
> | <rtd>
Detail: This default escape to record types seems a bit premature, as
record types may be an instance of some other primitive underlying
type mechanism. It also goes against the notational convention of
using predicates. How about (has-record-type? <rtd> _) or something
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the R6RS