What is your array?

For 20 months now, I have been asking array language affiliates to describe what is special about the array languages.   To be perfectly frank and at the risk of making myself unpopular,  most of the answers are either vague or boring.

What occurred to me today while talking with one of my mentors, is that I’ve been trying to explain this eternal mystery since my childhood.  I badly lost the my-dad-is-bigger/meaner/smarter-than-your-dad competitions on the playground.  Believe me, it was a struggle to maintain my culturally weird Canadian position on that small patch of American ground.

The second thing that I realized is that if I haven’t found a satisfying answer to this question within the community in my lifetime; maybe that’s the nature of the beast.  Not that there is no answer, but that we don’t know how to articulate it.  So I’ve decided to change my approach.

My new line of inquiry is this: what is your array and what do you do with it?


11 Responses to “What is your array?”

  • Surely “scalar extension” must be high on your list of what’s special. A lazy programmer is a productive programmer.

  • Hi Cathy,
    First of all, I agree with Andrew – a lazy programmer is a productive programmer. Much of my creativity came from my laziness.
    Second, my array is the piano keaboard. And I do a lot with it. Touching, rearranging, preparing, &c.
    Better to ask Stanley Jordan what HE did with it … talking about arrays? “Clouds of arrays” was his keyword.
    Thanks for listening.

  • Re: “… I badly lost the my-dad-is-bigger/meaner/smarter-than-your-dad competitions on the playground.”

    You better hope that the Island’s internet service is not upgraded anytime soon. 🙂

  • aprogramminglanguage aprogramminglanguage

    There are a lot of details about the array languages that I think are special. It’s the explaining part that’s problematic. And this is my basic point.

    And my thing isn’t the programming anymore, but the explaining surely is. SO, there we go.

    And don’t worry, Hans. My dad has had years to get used to me and he’s mastered this with pride.

  • I’m going to take one more crack at your old question, rather than the new one. This is mostly because I’m not currently active as a programmer, so I don’t actually have an array to play with…

    What stunned me most about array programming, what truly liberated me, was that it took away all the *crap* of programming and let you concentrate intently on the problem to be solved. I wasn’t distracted by loop interations, variable declarations, array boundaries, and [god help us all] JCL. Isn’t this why we invented computers in the first place — to take away all the grunt work, and let us do the real work of solving the problem at hand?

    And, beyond that, array languages truly lead to thinking about problems in a totally different light. Instead of the linear, serial approach to processing, you could grasp the problem as one of *structure*, and automatically were pushed to see the possible extensions of a solution, rather than solve it for a very narrow set of parameters.

  • aprogramminglanguage aprogramminglanguage

    Ok Don, I’ll bite..

    You’re thinking in a different light… Different from what? Different how? What the heck is a linear, serial approach?

    People who don’t program need some sort of concrete example or analogy to understand what on earth we are talking about here – and just maybe people who program in other languages need one too.

  • APL and dialects have two strong suits: arrays, and adverbs (operators).

    C (non-array language):
    int a[n], b[n], i, z[];
    for(i=0;i < n;++i)z[i]=a[i]+b[i]; // repeat for each datatype double a[n], b[n], i, z[]; ... J: +/ (plus insert) */ (times insert) >./ (max insert)

    C: (left as exercise for the reader)

    The thing about adverbs is that with m verbs and n adverbs, you get m times n facilities, much better than m+n, in the most crucial place of all, in your head.

    For further examples, go into a J session, and under Studio|Labs… on the main menu bar select “An Idiosyncratic Introduction to J”.

  • To get a bunch of “contrast and compare” examples, go to rosettacode.org. For example, http://rosettacode.org/wiki/99_Bottles_of_Beer#J has the J solution to the “99 Bottles of Beer” problem, along with solutions in 116 other programming languages.

  • “What the heck is a linear, serial approach?”

    In such languages, you would generate a sum by adding one number at a time, then increase the loop counter, and fetch another number to add to the total. Repeat. There is a tremendous amount of “housekeeping” involved, and the process has a very specific goal—in this case the sum of a vector of numbers. To make this procedure more general would be quite difficult.

    By comparison, an array language will trivially give you the sum of a vector, a matrix, or an arbitrarily-dimensioned array as a matter of course. If you want the sum of some array across the fourth dimension, it is no more difficult than getting the sum of a small vector. So, the language invites you to look for generalized solutions to problems.

    Roger: I have been groping for a term in computing that describes a “linear, serial” style of computing, and keep vaguely hearing “X-machine” in my head, where X is the name of some computing pioneer. Am I thinking of Von Neumann, or whom?

  • > Roger: I have been groping for a term in computing that
    > describes a “linear, serial” style of computing, and keep
    > vaguely hearing “X-machine” in my head, where X is the
    > name of some computing pioneer. Am I thinking of Von
    > Neumann, or whom?

    You are thinking of the von Neumann bottleneck.

  • What about the “Turing tar pit”?

Comments are currently closed.

Analytics Plugin created by Jake Ruston's Wordpress Plugins - Powered by Laptop Cases and r4.