On Oct 21, 2011, at 9:47 AM, Mark Niemiec wrote:

> If we use your convention of capitalizing the J versions of terms, then
> this thread is all about the confusion between the terms "array" and
> "Array". But nobody has mentioned any similar confusion between "noun"
> and "Noun", "verb" and "Verb", "adverb" and "Adverb", "integer" and
> "Integer" or other English terms that are assigned J-specific meanings.

I was not suggesting any such convention.  I was merely making it clear which 
"array" I was referring to within the email that I wrote.

However, Roger and others have decided to use the language of Language to 
describe J's features: verb, noun, adverb, etc.  The reason given for using 
these words is that it makes more familiar and understandable how the J 
language works.  In other words, leveraging the common usage and understanding 
of the language of grammar to describe the grammar of a programming language.

In contrast, using "array" to mean a multidimensional object that has zero to 
an arbitrarily large number of dimensions is a bit counterintuitive.  Most 
people (not mathematicians) clearly understand "array" to mean 1 or more 
dimensions.  Most people do not understand what "zero-dimension" means.

I did a random sample interview of 10 people around my company and asked them:

a. when I say "array", what do you think of?
b. what do you think of a zero-dimension array?
c. do you think a zero-dimension array has a value?

Only one person, out of the ten, answered [c] with "yes; it's a point".  I 
asked her what her background was, and she said Mathematics and Statistics.  :)

A few people answered [c] with "null value"; these were DBAs or C# programmers. 
:)

In any case, I personally have no problem with array meaning zero or more 
values, with zero to N dimensions.  I just happened to have forgotten that 
"noun" was functionally equivalent to "array" in J's grammar.  

Thanks for the clarifying discussion and helpful pointers.

In regard to grammar, by the way, I notice that there does not seem to be any 
corollary to a pronoun in J -- except possibly the variables: x, y, m, u. 

It also occurs to me that a neat usage of the "adjective" concept might be with 
units, which do not exist in J, but do exist in another interesting language 
called Frink, by Alan Eliason.  For example, 15 is unit-less, but 15 liters is 
not the same as 15 gallons.  

Further, some units are compatible with other units, sometimes through 
conversion operations.  Eg: 3 liters + 2 gallons -> gallons
440450982/157725491 (approx. 2.7925161570744454)

Many units are incompatible with many other units.  E.g,: 15 miles * 2 liters 
-- makes no sense.

The concept of numeric qualifiers or "adjectives" is a nice way to extend the 
language in a very useful and productive way.   Of course, not sure how this 
could be done in J, without extending the grammar to include "adjectives" (noun 
modifiers).


--Alan

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

Reply via email to