🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.apl
Article #53

Indexing

#53
From: utzoodecvaxcwruecmphonton
Date: Fri, 28 Jan 1983 17:39
35 lines
1531 bytes
  In working with apl for an extended period of time I find the indexing
operations inconsistent with the rest of the language.  What goes on is more
than what meets the I.
  In trying to come up with something better, I thought about an indexing
operator like the following:

	V _ I .lh A

with a default of indexing the last axis.  You could index the first axis by
specifying an axis and you could apply the indexing function several times:

	V _ I1 .lh [ 1 ] A	(meaning V _ A[ I1; ])

	V _ I1 .lh I2 .lh A	(meaning V _ A[ I1; I2 ])

  The real problem with this, and the problem which current indexing causes
is when the indexing occurs to the left of an assignment.  We could try to
do something with parenthesis;

	(I .lh A) _ V

but this is awkward and may be impossible to implement.  An alternative
is another operator:

	A _ I .rh V		(meaning A[I] _ V)

  This still seems a little backwards.   But maybe indexing is by nature
backwards.  I invite comments and suggestions on this idea.

  What is nice about using the left and right hook for indexing is that
they fit in well with SCTC's proposed extended arrays.  (Left hook for
disclosing, Right hook for enclosing.)

					chas
					  (..decvax!cwruecmp!honton)
Technical Details
Message-ID: <bnews.cwruecmp.445>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!decvax!cwruecmp!honton
Newsgroups: net.lang.apl
Title: Indexing
Article-I.D.: cwruecmp.445
Posted: Fri Jan 28 17:39:14 1983
Received: Sat Jan 29 06:29:12 1983
Subject: Indexing
Date: Fri, 28 Jan 1983 17:39:14 +0000
Message-ID: <bnews.cwruecmp.445>