Email list hosting service & mailing list manager

relationship to SRFI-25 Per Bothner (30 Jul 2015 05:30 UTC)
Re: relationship to SRFI-25 John Cowan (30 Jul 2015 20:20 UTC)
Re: relationship to SRFI-25 Bradley Lucier (31 Jul 2015 21:00 UTC)
Re: relationship to SRFI-25 Bradley Lucier (26 Sep 2015 18:33 UTC)
Re: relationship to SRFI-25 Per Bothner (27 Sep 2015 05:34 UTC)
Re: relationship to SRFI-25 Bradley Lucier (28 Sep 2015 21:04 UTC)
Re: relationship to SRFI-25 Per Bothner (28 Sep 2015 21:29 UTC)
Re: relationship to SRFI-25 Bradley Lucier (28 Sep 2015 21:54 UTC)
Re: relationship to SRFI-25 Jamison Hope (28 Sep 2015 22:22 UTC)
Re: relationship to SRFI-25 Bradley Lucier (28 Sep 2015 22:38 UTC)
Re: relationship to SRFI-25 Jamison Hope (28 Sep 2015 23:20 UTC)
Re: relationship to SRFI-25 Bradley Lucier (29 Sep 2015 06:03 UTC)
Re: relationship to SRFI-25 Jamison Hope (29 Sep 2015 16:12 UTC)
Re: relationship to SRFI-25 Bradley Lucier (30 Sep 2015 03:42 UTC)

Re: relationship to SRFI-25 Bradley Lucier 30 Sep 2015 03:42 UTC

> On Sep 29, 2015, at 12:12 PM, Jamison Hope <xxxxxx@alum.mit.edu> wrote:

Thank you for your explanation, it was very helpful.

>
> But I digress.  My original point was just that with most Scheme APIs,
> the user-level single-element accessors are functions TYPE-ref and
> TYPE-set! which take as arguments an instance of the TYPE as well as the
> location within TYPE (index or key).
>
> If I want to read out single values from several vectors, I repeatedly
> call the same function (vector-ref) passing each vector in turn.  If I
> want to read out single values from several strings, I repeatedly call
> the same function (string-ref) passing each string in turn.  If I want
> to read out single values from several SRFI-25 arrays, I repeatedly call
> the same function (array-ref) passing each.  If I want to read out
> single values from several SRFI-122 arrays, I must explicitly retrieve
> a separate getter procedure for each array.

I admit that the design of this SRFI is not optimized for the case where one wants to read single values from several arrays.  It is designed to get away from (1) the “move one word at a time” model of programming, and (2) the “store all elements of an array somewhere at the same time” model of programming.

> Again, there's nothing wrong with that in principle, but within the
> ecosystem of existing Scheme libraries, it violates the principle of
> least astonishment.

Over the years I’ve found that other people and I are astonished very different amounts by various things.  I *really* don’t like this principle.

>
> -Jamie
>
> [1] https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg03277.html

I’ve seen it, I like it.

Brad