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

Re: linear -> affine and shapes are immutable

lucier@xxxxxxxxxxxxxxx writes:

> I would suggest that "affine" would be a better name than
> "linear" for the properties of the access functions.  Linear
> is OK (as in linear as opposed to quadratic polynomials), but in
> this context with all the "vector"s and "array"s, I think affine
> would be better.

Interesting. A book on Java 2D graphics defines affine transformation
as "one in which parallel lines are still parallel after ...".

I cannot judge which is better. I don't want to put in anything about
parallel lines. Does "each index is a sum of multiples" match "affine"
at least as well as it matches "linear"?

> Also, instead of saying
> It is an error to store anything in an element of a shape.
> can one just say that "Shapes are immutable"?

We might indeed want to specify the latter. It is not so now: any
array of the right form can be used as a shape, `make-array' just
stores it into the new record, the _shape_ remains happily mutable -
it is only the array that breaks horribly if you mutate its shape.

Choices are to specify that `array-shape' returns an immutable array
(copy if needed) or to leave it as an implementation quality issue.