Re: list*->array argument order
Bradley Lucier 03 Mar 2022 19:53 UTC
On 2/21/22 4:44 PM, Bradley Lucier wrote:
> On 2/20/22 9:31 PM, Arthur A. Gleckler wrote:
>> On Sun, Feb 20, 2022 at 12:55 PM Bradley Lucier
>> <xxxxxx@math.purdue.edu <mailto:xxxxxx@math.purdue.edu>> wrote:
>>
>> The first two arguments are required, but I'm beginning to think that
>> the short required argument, the dimension, should come before the
>> data
>> itself, which can be quite large.
>>
>>
>> [Editor's hat off.] That sounds smart to me. Most of the time, the
>> data won't be literal, but sometimes it is, and I don't see any reason
>> to choose the other order.
>
> Thinking about it again, because a list/vector/list*/vector* is being
> converted to an array, with some auxiliary information, maybe it is a
> good idea to have an argument-list convention of
>
> (define (list->array list domain-interval ...))
> (define (list*->array list* dimension ...))
> (define (vector->array vector domain-interval ...))
> (define (vector*->array vector* dimension ...))
>
> Brad
Based on your comments I made the argument order
(define (list->array interval list ...))
(define (list*->array dimension list* ...))
(define (vector->array interval vector ...))
(define (vector*->array dimension vector* ...))
Of these routines, only list->array appears in SRFI 179, so this is an
incompatible change for that procedure.
Brad