Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2023
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. Henry,
  2.  
  3.  
  4.  
  5. I offer this as tangentially responsive to your question (posted to
  6. jprogramming), "How do you convince someone that J is really different?"
  7.  
  8.  
  9.  
  10. I'm an amateur J programmer and I think I know what makes J different. I
  11. still remember (rather hazily; see below) the moment when it hit me. FWIW,
  12. here is my conversion story.
  13.  
  14.  
  15.  
  16. One evening in a midtown Manhattan bar in 1989, over the course of nearly a
  17. dozen pints of Guinness between us, a VP at Morgan Stanley persuaded me (a
  18. junior Smalltalk programmer) that APL was a gift from the gods. He told a
  19. wonderful story about showing it to his wife (who was struggling through a
  20. FORTRAN class): when she realized that she could just type in two lists of
  21. numbers with a “+” between them rather than declaring, assigning and
  22. looping, her face lit up like the very dawn. He was bitterly convinced
  23. that absent the unconscionable interference of Bob Frankston and Dan
  24. Bricklin, APL—not the spreadsheet—would have conquered the world. His name
  25. was R0ml (yes, that is a digit) and he was without question the smartest
  26. programmer who’s ever been willing to drink with me.
  27.  
  28.  
  29.  
  30. The need for a custom keyboard was enough to keep my admiration for APL
  31. distant if sincere, but when J became available I jumped on it,
  32. thinking, “This
  33. will actually be _better_ because Ken Iverson will fix everything he
  34. doesn’t like about APL.” I was very enthusiastic, and remained so as I
  35. hunched over my machine, ruthlessly (if explicitly) dispatching toy
  36. problems. I found J (still the only array language I’ve studied) to be a
  37. towering intellectual achievement—it was clear that far more thought had
  38. gone into it than into any language I’d ever used. My father (proud owner
  39. of a threadbare “Bring Back the 7090” T-shirt) told a story about pushing
  40. my baby carriage down the sidewalk while reading the first FORTRAN manual,
  41. absolutely convinced that the mind of Man could do no more. For the first
  42. time, I knew how he’d felt.
  43.  
  44.  
  45.  
  46. My 30 years with J have been those of an on-again-off-again hobbyist. Like
  47. most "J-Adjacents," I suspect, I've tried to persuade my employer of the
  48. moment to use it for this or that problem domain. It always went about as
  49. well as you might imagine.
  50.  
  51.  
  52.  
  53. So what did R0ml tell me that made such a huge impression? Several
  54. things--none surprising to this group, each a revelation to me as we drank.
  55.  
  56.  
  57.  
  58. 1. Most programming languages' primitives operate on scalars. There's
  59. not much you can do with scalars: add them, subtract one from another, take
  60. a remainder, index into an array, etc. So most programming languages
  61. have few primitives.
  62.  
  63.  
  64.  
  65. 1. You can't accomplish much with individual scalars. You have to work
  66. with collections of them to get anything done. These collections are
  67. often arrays. If you find yourself looping, you're probably dealing
  68. with an array (if only implicitly).
  69.  
  70.  
  71.  
  72. 1. APL's primitives operate on arrays. (Here he went through a few
  73. classic, eyebrow-raising examples.)
  74.  
  75.  
  76.  
  77. 1. Two implications of primitives operating on arrays: first, you
  78. write/test/maintain a lot less code (insert canonical example of using a
  79. nested loop to add two vectors).
  80.  
  81.  
  82.  
  83. 1. Second, because arrays are richer constructs than scalars, you can
  84. have a lot more primitives. That's great news for the power of the
  85. language (and the length of your programs) but…
  86.  
  87.  
  88.  
  89. 1. …it's not the end of the story. Learning a language means learning
  90. (most of) its primitives, so learning APL takes (a lot) longer than
  91. learning a conventional language, even before you take into account the
  92. geometric increase in idioms. This higher threshold for competence
  93. turns out to be a significant barrier to adoption, despite APL's (array
  94. languages') obvious advantages once you're over the hump.
  95.  
  96.  
  97.  
  98. And there we called it a night (he picked up the tab). I found the case he
  99. made clear, compelling, horizon-shattering, persuasive
  100. and--ultimately--somewhat discouraging. I have yet to run across one that
  101. I found more so.
  102.  
  103.  
  104. As I said, FWIW.
  105.  
  106.  
  107.  
  108. Many thanks, Henry, for all of your technical- and pedagogical
  109. contributions over the decades.
  110.  
  111.  
  112.  
  113. Ed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement