[ vs linebreak [ is a single sentence that executes right to left linebreak is multiple sentences that execute in turn from left to right
On Sat, Apr 1, 2023 at 11:35 AM Henry Rich <henryhr...@gmail.com> wrote: > When is linebreak used? That is, when is it superior to [? > > Henry Rich > > On 4/1/2023 11:29 AM, Eric Iverson wrote: > > I am in favor of linebreak as well as a linejoin. I'd very much like to > > have an easier to type NB. > > > > .. NB. > > ... linejoin (followed by comment) > > .... linebreak > > > > I used to think internal and nested comments were important, but not > > anymore. Not enough bang for the required mechanism. > > > > > > > > On Sat, Apr 1, 2023 at 10:48 AM Jan-Pieter Jacobs < > > janpieter.jac...@gmail.com> wrote: > > > >> I'd be in favour of both .. and ... . > >> Regarding ... , I'd like to note that Matlab uses the same as line > joiner > >> (see > >> > >> > https://www.mathworks.com/help/matlab/matlab_prog/continue-long-statements-on-multiple-lines.html > >> ), > >> and also turns everything after that into a comment (which is very > handy). > >> This would let one also comment longer tacit verbs well, without any > >> extraneous NB.'s . Trivial example would be: > >> avg =: ... > >> +/ ... sum > >> % ... divided by > >> # ... count > >> > >> Your first comment would be incompatible with the easy commenting > (without > >> using NB.). > >> > >> I don't like the .:. proposal, since it is more difficult to type > different > >> characters instead of the same; I'd rather have ::: (could imagine them > >> looking like the holes for shoelaces, that can be used to tie together > >> lines)... > >> > >> Jan-Pieter > >> > >> > >> > >> On Sat, 1 Apr 2023, 11:26 Elijah Stone, <elro...@elronnd.net> wrote: > >> > >>> Some time ago, Michal proposed that a line separator be added. I want > to > >>> rekindle that discussion. The proposal was that .. behave like a line > >>> break > >>> when placed on a single line, such that e.g. {{ a=. y+y .. a }} 2 would > >> do > >>> the > >>> obvious thing. Short, distinctive, and to the point. > >>> > >>> I also want to propose a line _joiner_, analogous to \ in shell or c: > >> ..., > >>> placed at the beginning or end of a line should join it with the > previous > >>> or > >>> next. Joining lines happens _after_ stripping comments, unlike the > other > >>> languages I cited; the goal is to enable large, multi-line definitions > >>> with > >>> commentary for intermediate terms, without the need for pointless > >>> intermediate > >>> definitions. > >>> > >>> It might be objectionable to use such similar symbols for separators > and > >>> joiners. But maybe it's not such a big deal. Two more ideas: > >>> > >>> 1. Could use the _same_ symbol for both, with its sense depending on > >> where > >>> it's placed in a line. > >>> > >>> 2. Separator could be .:.; metaphor: a hill stops the interpreter in > its > >>> tracks. > >>> > >>> I don't like 2 because the larger the separator is, the more annoying > it > >>> is to > >>> use. Joiner can afford to be large, since it only comes into play if > the > >>> rest > >>> of the line is sufficiently large. > >>> > >>> Anyway--thoughts? Comments? Suggestions? > >>> > >>> -E > >>> ---------------------------------------------------------------------- > >>> For information about J forums see http://www.jsoftware.com/forums.htm > >>> > >> ---------------------------------------------------------------------- > >> For information about J forums see http://www.jsoftware.com/forums.htm > >> > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm