Bear in mind control words are really defined by a sublanguage of J, and could
easily have been defined under the ":" vocab entry with no ramifications in the
interpreter.
For J primitives, the answer is (B); . is an inseparable part of the
spelling. It is the last letter of the word. It is like the "e" in "fate".
Removing it results in a different word.
Traditionally, we have called it an "inflexion", which as a non-linguist I take
to mean "diacritic", or essentially an extra decoration or marker added to a
letter, to produce a new letter. Like umlaut. I am fine with this
nomenclature so long as there exist (relatively) well known human languages in
which the diacritic "makes all the difference", i.e. the diacritic is not a
merely hint towards pronunciation but matter of identity, and removing it
renders a new and different letter, and consequently a new and different word
(like changing a->u changes "cat" to "cut").
But I speak only English, so I don't know if other well-established languages
have this "diacritical dependency" certainly I can cite none.
My gut says that the role of . in control words is different and more
akin to (A), but I don't know if I could support such an argument. But I do
know that if I were writing a J interpreter, I would have separate rules for
primaries and control words. In broad strokes, something like
primitive =: '[:graphic:]|([:graphic:]|[:alphanum:][.:]+)'
control_word =: '[:alpha:]{2,}\.'
The latter could have been rendered '[:alpha:][:alpha:]+\.' But the key thing
is that control words have 2 or more chars before the inflexion, and anything
with a single char and and inflexion is a primary by definition (and of course
primaries can be uninflected or inflected differently (using colon or multiple
inflections), and control words are only recognized by the explicit
interpreter, always end only with a single . , are always lowercase except for
user-defined parts of them, etc etc etc). Underscores and other details left
as an exercise for the (bored) reader.
So the overall answer is (C), but with "sometimes" well defined.
-Dan
Please excuse typos; composed on a handheld device.
-----Original Message-----
From: "Sherlock, Ric" <[email protected]>
Date: Wed, 13 Jan 2010 11:49:19
To: Programming forum<[email protected]>
Subject: [Jprogramming] The role of the . in J words
I am working with the maintainer of GeSHi (syntax highlighter used on Rosetta
Code) to improve support for J.
As part of that process I'm seeking clarification of the role of the fullstop
character (.) as it appears in J words, eg: (do.) (for.) (p.) (p..) (*.) (.)
(.:) (..)
Is the fullstop
A) a symbol to control language flow,
B) an integral part of the word,
C) some other better description?
Or slightly differently:
Is the fullstop
A) syntax/punctuation,
B) spelling,
C) sometimes one, sometimes the other?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm