From: David Pirotte <david@altosw.be>
To: Daniel Llorens <daniel.llorens@bluewin.ch>
Cc: guile-user@gnu.org
Subject: Re: name an array function
Date: Wed, 23 Nov 2016 18:48:56 -0200 [thread overview]
Message-ID: <20161123184856.4c6b276b@capac> (raw)
In-Reply-To: <F41AF455-D1B8-4D68-930B-E325B9031464@bluewin.ch>
[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]
Le Wed, 23 Nov 2016 17:07:30 +0100,
Daniel Llorens <daniel.llorens@bluewin.ch> a écrit :
> On 21 Nov 2016, at 14:56, tomas@tuxteam.de wrote:
>
> > I (politely) disagree: the most "commonly" used function is
> > already array-ref, so you would seldomly use array-from/slice
> > for a scalar result (the rank-0 result will be more frequent,
> > because there's no substitute). But hey, as I said.
>
> I don't use array-ref/set! anymore since array-from/amend! generalize them. I
> actually use a further generalization in a separate library :p
>
> But I have a proposal below that makes this discussion moot, I hope.
>
> | master (current) | meaning | proposal |
> |---------------------+----------------------------------+----------------------|
> | array-from* | look up subarray, even #0(x) | array-slice |
> | array-from | look up cell, so x and not #0(x) | array-cell-ref |
> | array-amend! | set cell | array-cell-set! |
> | array-for-each-cell | iterate over subarrays | array-for-each-slice |
I'd use
array-slice-ref/set!
array-slice-for-each
Unless I miss understood something :)
Cheers,
David
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2016-11-23 20:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-21 10:32 name an array function Daniel Llorens
2016-11-21 12:37 ` Stefan Israelsson Tampe
2016-11-21 12:55 ` tomas
2016-11-21 13:10 ` Daniel Llorens
2016-11-21 13:24 ` tomas
2016-11-21 13:42 ` Daniel Llorens
2016-11-21 13:56 ` tomas
2016-11-23 16:07 ` Daniel Llorens
2016-11-23 20:32 ` tomas
2016-11-23 20:48 ` David Pirotte [this message]
2016-12-15 11:12 ` Daniel Llorens
2016-12-15 11:30 ` tomas
2016-11-21 14:01 ` Panicz Maciej Godek
2016-11-21 14:38 ` Daniel Llorens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161123184856.4c6b276b@capac \
--to=david@altosw.be \
--cc=daniel.llorens@bluewin.ch \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).