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

Questions about COERCE



I believe that we currently treat all of your examples as errors also.
Coerce says it will do certain particular conversions, and that's all we
provided, using a narrow reading for such phrases as "other sequence
type".

Since Coerce pretty much has to be coded as an N*M dispatch (with some
few opportunities for folding), and all of those dispatch cases want to
be optimized at compile-time if the args are of known type, we would
really like to keep M reasonably small.  So I argue that we should use
COERCE just to move between major types, as enumerated in the manual,
and should use more specific functions to change the length of vectors
or trim off control bits.  If we try to make coerce be the universal
unary operator, we're going to need DEFCOERCE and god knows what else.

-- Scott