> From: Don Watson > > "If @: were replaced by the equivalent special fork [: f g , > then a sentence can be written as an unbroken . . . sequence of > forks." > > That sentence suggests that tacit J follows a rule that is simple > and elegant. It also means, as far as I can tell, that the documentation > should not be teaching people to use "@:", the clumsiness of which > caused me to rebel against it. You also can't follow one elegant rule of > a sequence of forks if you include hooks - leave them out - you don't > need them.
I do agree that it is easier to come to grips with tacit if you simplify things so you only deal with verbs and forks (i.e. don't use conjunctions and hooks). I also remember that initially I preferred using [: f g to f...@g for that reason. Getting rid of the @: and @ conjunctions made it much easier for me to see where the forks were. I knew however from forum messages that other users much preferred the @: syntax (beauty is in the eye of the beholder!). However with time I now find that f...@g does a better job of showing the intent of the code i.e. that you are combining two verbs together to produce a new verb (the eye of the beholder is subject to change!). My point is that ignoring @: and @ in the documentation would reduce the richness of J and prevent users from developing their fluency to its potential. If you have not already looked at the following wiki pages, I suggest you do so. They introduce the concepts of creating and reading tacit verbs bit by bit starting with a simple, no-conjunction, no-hook form and moving to a more complex (but shorter) form including conjunctions. http://www.jsoftware.com/jwiki/Guides/Defining%20Verbs http://www.jsoftware.com/jwiki/Guides/Reading%20Tacit%20Verbs Note too that J's built in explicit to tacit translator will use the "[: f g" form without hooks. Here is an explicit version of the standard deviation formula you have used throughout your learning process: %: (+/ *: y - (+/y) % #y) % <:#y (note I would still prefer to break this up into smaller component definitions for pedagogical and code reuse reasons) Here is the translation to tacit provided by 13 : '' 13 : '%: (+/ *: y - (+/y) % #y) % <:#y' [: %: ([: +/ [: *: ] - +/ % #) % [: <: # > One of my problems with J documentation has been the fact that it > doesn't often tell you "why". It just tells you "what" and "how". > > There may be those who can learn without ever wanting to know why, > but every little child asks "Why?". Many of us continue to do so > throughout our life. Though hopefully we get better at identifying and asking the question to which we want the answer. > That sentence should be first and foremost in large letters at the > beginning of the introduction to tacit J. The examples should be written > to emphasize the elegance of tacit J as a sequence of forks - without "@:" > or hooks. I'm not sure I agree that this is the key "why" question for most beginning J users. > I can now learn and use tacit J - which means, thank goodness that > I won't have to use explicit J, which I hate. But if you want more > people to use tacit J - do something about the documentation. So therefore you "hated" APL too? I suspect that you don't really "hate" explicit J (if so I'd like to hear why), but in fact you mean that you "hate" the method of creating explicit definitions? If you are still planning on using J for introducing students to mathematical concepts, I sure hope that you do some testing first to check that your perception of explicit vs tacit J is shared by the majority of them too. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
