Following up on SRFI 179
Bradley Lucier
(22 Sep 2021 22:30 UTC)
|
Re: Following up on SRFI 179
John Cowan
(24 Sep 2021 19:24 UTC)
|
Re: Following up on SRFI 179
Alex Shinn
(25 Sep 2021 13:24 UTC)
|
Re: Following up on SRFI 179
Bradley Lucier
(25 Sep 2021 16:43 UTC)
|
Re: Following up on SRFI 179
Alex Shinn
(28 Sep 2021 07:36 UTC)
|
Re: Following up on SRFI 179
Bradley Lucier
(28 Sep 2021 20:20 UTC)
|
Re: Following up on SRFI 179
Bradley Lucier
(28 Sep 2021 20:30 UTC)
|
Re: Following up on SRFI 179
Bradley Lucier
(01 Oct 2021 00:07 UTC)
|
Re: Following up on SRFI 179
Alex Shinn
(01 Oct 2021 00:43 UTC)
|
array-copy, array-stack, array-append: What should the defaults be?
Bradley Lucier
(02 Oct 2021 18:42 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be?
Alex Shinn
(04 Oct 2021 08:24 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be? Bradley Lucier (04 Oct 2021 14:27 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be?
Alex Shinn
(04 Oct 2021 21:34 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be?
Bradley Lucier
(04 Oct 2021 22:04 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be?
John Cowan
(04 Oct 2021 22:39 UTC)
|
Re: array-copy, array-stack, array-append: What should the defaults be?
Bradley Lucier
(16 Jan 2022 18:56 UTC)
|
Re: Following up on SRFI 179
Lucier, Bradley J
(05 Oct 2021 01:04 UTC)
|
Re: Following up on SRFI 179
John Cowan
(06 Oct 2021 01:26 UTC)
|
Re: Following up on SRFI 179
Lucier, Bradley J
(06 Oct 2021 13:48 UTC)
|
Re: Following up on SRFI 179
Bradley Lucier
(05 Oct 2021 19:54 UTC)
|
array-{append|stack|inner-product}
Bradley Lucier
(21 Oct 2021 15:52 UTC)
|
On 10/4/21 4:23 AM, Alex Shinn wrote: > On Sun, Oct 3, 2021 at 3:42 AM Bradley Lucier <xxxxxx@math.purdue.edu> wrote: >> >> This led me to think again about >> >> (array-copy array [storage-class [mutable? [safe?]]]) >> >> and the commit message of >> >> https://github.com/gambiteer/srfi-179-followup/commit/f2de257e87f341dc1edff0e7b060394bd9960349 >> >> says that >> >> 1. If the first argument to array-copy is a specialized array, then the >> values of omitted arguments storage-class, mutable?, and safe? are taken >> from the first argument, not generic-storage-class, >> (specialized-array-default-mutable?), and >> (specialized-array-default-safe?), respectively. >> >> So the new array is a true copy of the input specialized array. >> >> Any thoughts about what the defaults should be? > > I think this is fine - since the name says it is making a copy, it's > reasonable to copy as faithfully as possible. > > The other original procedures returning new arrays are all transforms > based on specialized-array-share, which also takes mutability and > safety from the array argument. Since these are views sharing the > same underlying storage it arguably makes more sense to share > these settings than in a copy. > > The new procedures array-append and array-stack are special in that > they take more than one array argument, so the more complex default > is acceptable. > > But I still think it's worth considering making these constants instead > of parameters, in which case for array-append and array-stack we > need to revert to your more complex proposed signature. > In April you wrote something I now think I didn't understand: >> 2. If the default is implementation dependent, then every program, no >> matter how it wants default-mutable? and default-safe? to be set, is >> going to have to start with calls to >> >> (specialized-array-default-safe? <whatever>) >> (specialized-array-default-mutable? <whatever>) >> >> which is, in my opinion, unfortunate. > > Safety is a little vague and implementation-specific to begin with, > so it may be OK to leave as a parameter, but I think using such a > dynamic parameter at all for mutable? was a mistake. The default > should be built into the constructor procedures themselves. > > The situation is made worse that these are not explicitly SRFI 39 > or R7RS parameters. I responded to this last sentence by making specialized-array-default-safe? and specialized-array-default-mutable? parameters, but now I suspect that's not your first choice. So now, what do you mean by: > But I still think it's worth considering making these constants instead > of parameters, in which case for array-append and array-stack we > need to revert to your more complex proposed signature. > What do you mean "making these constants"? Implementation-dependent? I don't understand. Brad