Raul Miller <[EMAIL PROTECTED]> writes:

> 
> But this conflicts with the final paragraph on that page.  

well, the final paragraph said that most languages dealt with the items of a
list one at a time. my for version still deals with the items one at a time. it
is not as cumbersome as the earlier solutions, but it still suffers from a
serious case of DWIS instead of being DWIM.

> 
> More specifically, most languages treat looping as an indeterminate
> construct -- you start at the beginning, but then must test each time
> through the loop to see if you are done yet.  And that, I think, is the
> point of that part of that page.
> 

I think the item-by-item drudgery is the point of that part of the page. Even in
agile languages like Python and Perl, you still are stuck with item-by-item
drudgery.. actually that is not true for these languages thanks to SciPy and PDL
(perl data language). In fact, I bet C++ has functionals or something to do
this...hey! wait.. what language doesnt have a way to zip two lists and then
apply a binary operator to them? None that I know.. Haskell can certainly do it.

But I think the J concept of ranking functions is far more scaleable in the long
run. But most languages have tacked on some way of handling the most common case
easily.




----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to