[Jprogramming] Nested structures. Idioms? Combinators?

neitzel at gaertner.de neitzel at gaertner.de
Fri Feb 12 11:50:59 UTC 2016


Matthew Baulch wrote:
>
> You're probably right that an ASCII name of its own would be better.
> Not many primitive names available, it seems. Oh well.

Infinitely many J primitive names are available.
>From <http://jsoftware.com/help/dictionary/dict1.htm>, [emphasis mine]: 

	A primitive or primary may be denoted by a single graphic
	(such as + for plus) or by a graphic modified by ONE OR MORE
	following inflections (a period or colon), as in +. and +:
	for or and nor. A primary may also be an inflected name, as in
	e. and o. for membership and pi times.

This was a concious design decision.  There are already primitives with
more than one inflections [exercise: find them], which were added in
later times to the language.  The Words ;: scanner tokenizes according
to this rule, too.

So: it would be no problem to place new primitives at, say,

		".:.:.

		"::.

and call them CamelDo and PoodleDo, most easily to remember.

							Martin


More information about the Programming mailing list