Re: Literals embedded in vector and array datums must type-match with the container
Peter McGoron 27 Apr 2026 20:21 UTC
Addendum:
> inexact arrays must have inexact literals
I assume that is also inexact *real* literals.
> complex arrays must have complex literals
Requiring complex literals sounds somewhat cumbersome if many of the
numbers I am inserting have zero imaginary part.
It would also make it a pain to copy-paste numbers.
Also, how would these restrictions interact with a hypothetical
quasiquoting numerical vector?
_________________________________
> I would leave it unspecified
I would at least add the following as a possible extension:
1. An exact number in an inexact real number array is converted as if
`inexact` was called on it.
2. A real number X in an complex number array is converted as if
`(make-rectangular (inexact X) 0.0)` was evaluated in that spot.
3. An exact complex number Z in a complex number array is converted as
if `inexact was called on it.
-- Peter McGoron