[Jprogramming] index origin 0

Pablo Landherr pablo.landherr at gmail.com
Mon Jul 26 19:15:12 HKT 2010


The choice of a fixed value for index origin in general and 0 in particular
have made a slight majority of problems easier to code in J compared to APL
(where I did most problem solving prior to J). I remember writing
[]io-independent APL either by localising []io or by using []io in the
relevant expressions, but it never became a habit and most of my
APL-solutions were not []io-independent.
I consider the present solution in J to be superior.
I am a graduate of Stockholm School of Ecomomics and used APL/J for
financial problems: bond calculations, options valutation and trading (
http://portal.acm.org/citation.cfm?doid=55626.55657) Full disclosure: I
worked briefly at I.P. Sharp Associates in 1983.
/Pablo Landherr
On Sat, Jul 24, 2010 at 3:16 PM, Roger Hui <rhui000 at shaw.ca> wrote:
> I have been asked by some APL colleagues about
> index origin 0 in J. The question is, does the choice
> of a fixed value of 0 for index origin a hindrance to
> your work? The question is specifically addressed
> to "ordinary domain experts", people with no
> software engineering in their background and are not
> professional mathematicians.
>> In case you did not know, in APL there is a choice
> known as the index origin, controlled by the variable
> quad-io, of counting from 1 instead of from 0, affecting
> the left argument of { and the result of i. , among other things.
> I will say no more than this to avoid biasing your answers.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


More information about the Programming mailing list

AltStyle によって変換されたページ (->オリジナル) /