I appreciate your explanation very much, thanks, but do not share your preference in avoiding parens. For me they make scanning J code easier. The other point you make, avoiding special handling, I also disagree on. But let's not argue any further on these, since it's all more a matter of taste.
Intrigued as I am by your "typing from right to left", I was wondering whether you can upload a video to YouTube on how to do that. A lot of newbie's and veterans alike would be interested. R.E. Boss > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:[email protected]] > Namens Dan Bron > Verzonden: woensdag 24 februari 2010 15:54 > Aan: 'General forum' > Onderwerp: Re: [Jgeneral] GB_Flip RNG seed > > I wrote: > > ... ,&":&.> ... > > REB wrote: > > I would prefer > > ... (,~ ":)&.> ... > > I actually considered this as I wrote the line, and decided &": was > more elegant. My reasoning was along the same lines that > ] can be considered elegant. In literal ,&": numeric the format is > applied to both arguments equally; neither is treated > "specially", and ": is defined such that for literal values it acts like > ] . That is, I'm leveraging a useful feature of ": > in order to avoid special handling; these my code shorter, cleaner, and > more fluent. > > Anyway, my main motivation was to avoid the extra pair of parens. I find > scanning J code becomes slower for every extra set of > parens, particularly nested parens. Not to say I gave this line a lot of > consideration; these were just idle, half-heard thoughts > as I typed my way from the right to the left. I've definitely used the > (,~ ":) idiom before and I agree it can draw the reader's > attention to the differences between the left and right arguments, if > that's what you want him to focus on. > > -Dan > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
