From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: J is NOT APL (was Re: Interpreter advice sought.)
Organization: San Francisco State University
Date: Sat, 23 Jan 1993 18:32:43 GMT

 Here is the case for J:

 1. Price:

    a.) Not everyone has the resources to purchase powerful
        APL software. For example, I understand that Manugistics 
        APL for the PC retails at $1700. 

           Now $1700 is a great deal. This product has *lots* of nice 
           features associated with communicating with other software 
           like Excell, Paradox,  and DBase. And fast performance too.

         But with J you can't beat the price. And you've got to like the
         fact that it provides users plenty of capabilities to create
         Windows applications on the PC which look professional.

    b.) No matter what machine I'm on, J is just an ftp away.

 3. J's Enhancements

    a.) The fundamental control structure (as of today) in APL
        is the branch. J provides constructs for "if" and "case
        statments" (via agenda), "do", "while", and most cases
        of "for" (via power and chain), and recursion (via  
        self-reference).  These modifications alone make J
        different than APL.

    b.) J's functional nature makes it more modular than APL.

  4. Readibility

   a.) J can be made as readable as one would like it to be by
       renaming J's primitives english spellings.  One
       can argue that it is easier to read than APL, eventhough
       APL has nice mathematical symbols.  I turned in the
       program (below) in a class where the instructor  was
       very sceptical about J and really only keen on C and Modula.
       He may have heard some disparaging remarks on comp.lang.misc
       about how cryptic J can be.  But without having seen APL or J before,
       he was able to easily follow the logic of the program and 
       was impressed that I was the first person to complete the 
       assignment. 

    b.) Even with it's mathematical symbols APL can be *pretty* terse.

    c.) If you are working in an environment where you are the *only*
        person using a non-imperative language, you won't be at a loss
        if the printer you must use does not print APL symbols.

   5. J is not APL.

    a.) OK. What is J like?  It's more like APL than like more
        frequently sited functional software like FP, or Haskel.

   6. Negatives (from the point of view of a J'er) 

    a.) The J community is small and there is no body of literature
        to reference like Quote Quad.

    b.) There are not many people like Roger Hui who can answer 
        intermediate and advanced questions about programming in
        the language.

+--------+-+-------------------------------------------------------------------+
|+-+-+--+|:|NB. Kohonen self-organizing network program for csc671 project 1 |
||2|&|$:|| |target_vectors =: y. NB. y. is the right argument                  |
|+-+-+--+| |number_simulations =. square x. NB. x. is the left argument        |
|        | |NB. x. is 2 if khn is used as a monad                              |
|        | |training_vectors=.random_sort add_deviations target_vectors        |
|        | |j =. 0 NB. counts simulations                                      |
|        | |output =.''                                                        |
|        | |sim_loop)                                                          |
|        | |w =: unit_col_vector 5 - ? 3 25 $ 10 NB. initial weights matrix    |
|        | |i  =. 0                      NB. interation index                  |
|        | |n  =. tally training_vectors NB. data pass counter                 |
|        | |n3 =. n*3  NB. sentiel (pass thru data 3 times)                    |
|        | |alpha_set=. 0.5 ,0.333 , 0.166                                     |
|        | |loop) alpha_beta=.(append half)(take(n,n)antibase i) from alpha_set|
|       | |dmy=.((n residue i) from training_vectors) adjust_weights alpha_beta|
|        | |i =. inc i                                                         |
|        | |$.=. open  (n3 = i)  catalogue loop link cont                      |
|        | |cont)                                                              |
|        | |neural_responses=.(transpose w) mat_mult (transpose target_vectors)|
|        | |neural_responses =. 5 5 shape row_max_index neural_responses       |
|        | |output =. output, box neural_responses from 'abcd'                 |
|       | |$.=.open(number_simulations = j=.inc j ) catalogue sim_loop link end|
|        | |end)                                                               |
|      | |y. =. (,open(target_vectors&match)underopen cases) copy cases_header |
|        | |y.=. y. append box target_vectors                                  |
|        | |y. =. ravel_items y. append box (x. append x.) shape output        |
+--------+-+-------------------------------------------------------------------+