"Tracy Harms" <[EMAIL PROTECTED]> wrote:
> In comparing APL with J, the relative problems of J arise from the fact
> that J does more with less.  The reliance on standard punctuation marks
> is doubly difficult. First, there is the clash with pre-established
> meaning.

APL is also at odds with conventional meanings:
- no precedence of operations (10x4+2 is 60 rather than 42)
- right-to-left evalulation rather than left-to-right
- ! means factorial rather than exclamation
  (or, if you prefer mathematical notation, x factorial is !x rather than x!)
- ? means random rather than interrogation
- most computer languages use * for times; APL uses it for power
- most computer languages use / for divide; APL uses it for compress/reduce

Is it that you object to [ ] { } and " being used for primitives?

> J primaries have been constructed quite cleverly, but the
> normal meanings of the components still tend to vie for attention.
> Second, punctuation marks tend to be slight and spare, and the
> interpretation of punctuation is aided by many aspects of the context in
> which it occurs.  Leaning on these little things as heavily as J does
> runs contrary to what naturally evolves in manual writing. There are
> systematic reasons that many punctuation marks are little or relatively
> indistinguishable.

This is no different than arguing from the perspective of a large
alphabet (for example, the Cyrillic) that using the smaller Latin
alphabet with lots of accented letters is hard to read, because the
same accents are used on different letters. People fluent in languages
that used accented letters recognize the base letter and its associated
accent as a single morpheme, distinct from the base letter.

J works exactly the same way - just think of it as having dot
and diaeresis accents that are written to the right of the letter
rather than above it. This may seem unusual at first, but is
quite easy to get used to (In fact, there are several natural
languages that also write diacritics beside the base letters rather
than above or below them).

> Since APL symbols were designed for mnemonic clarity, their replacement
> with combinations of punctuation marks makes for a notation that is
> harder to read. This isn't news, and it isn't a scandal.

Mnemonic clarity is very subjective. While one can reasonably argue
that use of up/down pointing arrows for take/drop and up/down pines
for up/down sorting is very intuitive with regards to direction,
the choice of arrows for take/drop and pines for sorting is not at
all obvious - it could just as easily have been done the other way
around (and, in fact, since early APLs used take/drop only dyadically
and sorts only monadically, they could just as easily have used one
pair of symbols for both sets of functions).

In exactly the same way, J's use of [ and ] for left and right
and {. and }. for take and drop show clear relationships.
Whether they're "obvious" depends on how well one knows the language.

Compare the mnemonic clarity of English. Is there any reason why
"A" should be a vowel while "V" should be a consonant, just by looking at them?
 
> I do think it will be possible to enhance J, symbolically, so that it
> reclaims benefits of classical APL. My vision is that each J primary
> will continue to be specified with basic text, but the resulting display
> will be an appropriately mnemonic glyph. The adjoining characters that
> make up primary tokens would, in such an interface, serve in a manner
> similar to the early APL overstrike combinations described recently in
> this forum. Wherever the insertion point occurs the literal J code would
> be seen, but otherwise it would have a visually 'translated' form.

It would be quite easy to write a display front-end that "prettifies"
J code by displaying it using Unicode APL glyphs for J's digraphs and trigraphs,
while the internals still work using ASCII.
(One could also use some additional customized Unicode characters to
represent J primitives that have no APL equivalent)
 
> P.S. I actually am not in a position to agree that recognizing words and
> sentences is *easy* in APL, as my skill in it is minimal. Yet, even
> given my standpoint of ignorance, APL does seem to radiate clarity.

I agree that apl graphics look "cool and exotic". However, if you give
J a chance and get fluent with it, you can see it shares a beauty all its own.

-- Mark D. Niemiec <[EMAIL PROTECTED]>

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

Reply via email to