2010-01-11 Mike Cowlishaw <[email protected]>:

> There is a third path that one might consider, if it makes sense (in
> particular, the package needs to have some kind of persistent state, or
> able to get at some from the Rexx implementation), and that is: let the
> user choose.
>
> APL (I think it was) does this: essentially when starting to write a
> program using the package, you set a flag (to 0 or 1, perhaps) saying
> whether to use 0-based or 1-based indexing, according to preference.  The
> package then adjusts all indexes as requested.
>
> You still have to decide what the default should be (unless not specifying
> is an error), but that's a much easier (read: less stressful) decision if
> there's a way to override it.   (I'd agree with Chip on what the default
> should be :-).)

When I started reading this thread, APL's "index origin" came
immediately to mind. But in this case I find a REXX "astonishment
factor" -- not in its behaviour, but in that its author would agree
with and even propose something I imagined would be shot down in
moments. Instead, everyone seems to like it!

APL started with a global index origin, settable only as an overall
and external attribute of a workspace, and not capable of being set or
interrogated by the running program. This soon changed, but I believe
in most implementations it was/is still a global value not related to
any concept of package, or at least not to any package smaller than
the entire workspace.

There is an interesting _APL in the New Millennium_ article by Ken
Iverson at http://www.vector.org.uk/archive/v223/newmill.htm in which
he talked about some topics that will be familiar to the REXX
community - multiple dialects, community size, and index origin only
some of them.
(But I see that APL has a movie in the works - can REXX say that?
http://aprogramminglanguage.wordpress.com/film-synopsis/ .)

Hmmm...

KEI - IBM Fellow 1970
MFC - IBM Fellow 1990

Now if someone can tell me why the array class doesn't like indexes
less than 1...

Tony H.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to