Robert Bernecky wrote:
> Rather, axis brackets are a bit of archaic notation that
> would have been, were it not for The Installed User Base,
> discarded with no regrets. Sort of like cap, in J?

(in    http://www.jsoftware.com/pipermail/chat/2007-December/000827.html  )

I don't think  [:  is considered a design mistake.  At least, I don't see it 
that way.  Certainly  [: g h  is a grammatical anomaly, but it's limited, and 
covered by a single extra sentence in the DoJ (and a couple of diagrams).  For 
that small cost, it has great utility.

But what are the design mistakes in J?  What do we regret that we've put in the 
language?  If we had to do it all over again, what would we do differently?  
I'm thinking more along the lines of things which weren't in the language, but 
are used so much in extant code that we can't reverse the decision.

Here are some I can think of:

   *  The rank of  @  .  Because  @  is shorter than  @:  
      and because the  @:  is more commonly useful than 
      @  I wish that the meanings of  @  and  @:  were
      swapped.  Similarly for the pairs  &&:  &.&.:  

      This has been discussed before:

      http://www.jsoftware.com/pipermail/general/2007-September/030769.html
      

   *  Contrary to the above, I wish the adverse conjunction  ::  
      produced a verb with the rank of the nominal (i.e. not 
      infinite rank).  That is, I want (f :: g b. -: f b.) 0 
      to hold. For example:

           NB.  I'd like to handle  q:0  gracefully
           q: 0 1 2
        |domain error
        |       q:0 1 2


           NB.  But this isn't too useful.
           q: :: 0: 0 1 2
        0

           
           NB.  This is.  But it's long winded.
           q: :: 0:"q: 0 1 2
        0
        0
        2
      
      The current definition is consistent with many other
      operators, but not as useful as the alternative. 


   *  Roger's response to Raul's  @  vs  @:  msg above is 
      actually relevant to the topic of "Regrets":

      http://www.jsoftware.com/pipermail/general/2007-September/030770.html 

      I particularly agree with the redefinition of  /  from
      "(lu,_)  to  > u&.>/ (<"_1 y),<x if 0<#y  .  I do not 
      agree with  30!:  or Lisp syntax, etc.

   *  In that vein, Roger's also made several remarks about
      what he'd change with hindsight.  The biggest, and most 
      discussed, is the hook. 

      For example, in

        http://www.jsoftware.com/pipermail/general/2006-January/026271.html

      he says:

        With the hindsight from 17 years of usage, I would
        define 2-verb trains differently, viz.

            (f g) y   <->   f    g y
          x (f g) y   <->   f (x g y)

        And the ranks would be _ _ _

      Here is the earliest statement I could find to this
      effect:

      http://groups.google.com/group/comp.lang.apl/msg/8eb970c6af3816ad

      Other relevant links.  

      http://www.jsoftware.com/pipermail/general/2006-May/027067.html
      http://www.jsoftware.com/jwiki/Essays/Hook_Conjunction
     
      I would not support this change, because I like 
      and use hooks.  I once saw a message Eugene McDonnell 
      where he said that he pleaded with Ken & Roger to retain 
      hook:

      http://www.jsoftware.com/pipermail/general/2002-August/009366.html

      But his reasons had more to do with the expressing 
      Curry's combinators than aesthetics:

      http://www.jsoftware.com/pipermail/general/2002-August/009364.html

      Here are a couple of papers which discuss combinators 
      in the context of J:

      http://doi.acm.org/10.1145/75144.75172
      http://doi.acm.org/10.1145/114054.114065


   *  Roger also said he might reconsider indirect assignment:

      http://www.jsoftware.com/pipermail/general/2006-May/027041.html
 
      I personally would not support removing it.

   *  I similarly disagree with his sentiment that 
      complementary indexing ( (<<<x){y  )  be removed:  

      http://www.jsoftware.com/pipermail/general/2002-January/010896.html

   *  That msg reminds me that I see no reason for 
      monad  {  (catalog) to produce a boxed array.  The contents of 
      each of its boxes are going to agree in type and shape.  That 
      is, why is  {'ab';'cd'  a 2x2 array of boxes rather than a
      2x2x2 array of characters?  I usually end up writing  >@:{  .

   *  The last regret remember I Roger expressing is the constant 
      notation.  Unless I'm misremembering, he once said that if he 
      had to do it over again he'd simplify the notation for 
      constants (by eliminating parts of the scheme; maybe  ar ad  ?).
      But I cannot now find a reference. The best I can do is this, 
      where he says he wouldn't make it worse:

      http://www.jsoftware.com/pipermail/general/2005-October/025529.html

      I think reducing the complexity is a good idea, and I have some ideas
      of my own (e.g. based numbers use capital letters for digits > 9 ).  

I'd be very interested knowing what other mistakes people perceive J made.

-Dan

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

Reply via email to