-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 p j <[EMAIL PROTECTED]> writes:
> What would you expect the programmer intended in the > following? > 4*3 + 2*3 -1 > > Almost everyone would say: 12 + 6 - 1 'cept here. :-) > There's a way to unambiguously use whitespace to alter > binding precedence such that code is clearer to read, > and significantly faster to write and edit if you > consider the cursor movement and shift keys necessary > to add parentheses. > This would be very sweet sugar, and hope you consider > it. Let me know of any issues you find with the > approach. PJ, I'm uncertain whether to write this or not, for I generally have a very favorable attitude towards ideas for improving things. I'm repeating something I've written before; if there were a good spot for such on the Wiki, I'd write it there once and let people add to and modify it. If anyone has suggestions, I can start something when I get a few moments. Like you, I found things I thought were missing in the language and spent some not-so-fruitful time wrestling with the ideas years ago. When I found I wasn't making much progress in writing my first real J program, I stopped and regrouped. What I learned is that J is most like a language in the natural language sense. Or, better said, I (and others, I think, by observation here) learn J best by treating it as if it were another natural language: German, French, Chinese, Tagalong, .... Not being Mark Twain, when I first started learning German, I didn't complain and suggest Germans should really put all of their verbs together near the front of a sentence, because it was so hard to remember what you were talking about by the time you got to the end of the sentence and found the remaining verb fragments. I buckled down, tried to think like a German, and finally began to catch on. Eventually I began to find beauty in that language as expressed by Goethe and others, much as I had found and still find beauty in the English language as expressed by many of our best writers. I also discovered that certain things ended up being easier for me to express in German than in English. That was partially because I learned those ideas while living, thinking, and talking in German and partially because the denotations and connotations in German may lend themselves to certain things more closely that English (and vice versa). The same would be true of other languages; these just happens to be the two I know best. Here's where I pause and think. What I'm about to say sounds a bit like "shut up and do it my way" thinking, and I'm really not like that, at least in most areas. What I've learned is that learning J seems best done by those who don't start looking to mold it to fit their current worldview but by those who abandon (temporarily) their worldview to grok what J is and what it offers. At the end of the day, the really good J writers seem able to write elegant, expressive J, and many of them, I presume, can also write good C or C++ or Python or .... They seem to use them as they see fit -- sometimes selecting the best for the task at hand and perhaps sometimes selecting more what they feel like using on that day. Up front, it's tempting to suggest blending the best of all worlds, except that J continues to surprise in how expressive it is, and blending it with other constructs, if not done exceedingly thoughtfully, risks diluting that expressiveness. I'm not sure how to achieve thoughtful consideration of such ideas, for much of the expressiveness of J (like much of the expressiveness of English or German or Chinese) continues to be unfolded as I (we?) read what other elegant writers have written. I'm re-reading works by various J authors right now (Ken's Math for the Layman and J.E.H. Shaw's Warwick Guide to J) and discovering idioms I didn't know or remember. To serve as a calibration point, I'm the stick-in-the-mud who didn't even favor x and y (over x. and y.), and I have been bitten by that change once already. :-) PJ, I welcome your thoughtfulness to this group. I'd just encourage you to expend it on grokking J, as crazy as it may sometimes seem, rather than on ways to change J. Certainly J is a living language, but I think it works best if its changes are made slowly, thoughtfully, and out of a fundamental understanding of the essence of J, making it more J-like. Some of my essay here is about protecting the J I like; more of it, I think, is about helping you and others make the maximum use of J, and the path of changing J to fit existing ideas has rarely seemed to work with J. Does that help? Bill - -- Bill Harris http://facilitatedsystems.com/weblog/ Facilitated Systems Everett, WA 98208 USA http://facilitatedsystems.com/ phone: +1 425 337-5541 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: For more information, see http://www.gnupg.org iD8DBQFEIH153J3HaQTDvd8RAjChAJ9pQOEwTVD5x8Oq8RLjWHAXNE6LhQCdFhuX cXyULuiY9cltM1Z1RPE58+k= =/i6G -----END PGP SIGNATURE----- ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
