I actually was intending for quite a while to propose an extension to
comments along the lines of the suggestions in this thread:
to use ... as line continuation indicator that turns everything after it up
to and including the next line break to be considered comment, and still
considers the line to continue (Matlab does this the same, IIRC). It could
be thought of as a non-line-breaking version of NB. .

For instance (silly example):

avg =: ... averag operator
+/ ... sum
% ... divided by
# ... length

Now, it's certainly overkill for this tiny example, but I think it could be
valuable for longer trains.

Advantages of ... :
- not in use at the moment
- clear meaning (i.e. more code to follow)
- fits in with J word formation rules
- easy for communication to non-J experts
- length the same as NB.

Jan-Pieter

On Thu, 28 Apr 2022, 08:16 Hauke Rehr, <hauke.r...@uni-jena.de> wrote:

> The LEO editor might be a good fit.
> And yes, it’s really freaking (cool).
> A script could generate the actual .ijs from snippets that are well
> documented and those snippets may well be single J tokens.
>
> Am 28.04.22 um 08:10 schrieb Ed Gottsman:
> > LOL.  Fair question.  Here’s another: if J adopted a style standard
> around ideograms (which are rendered vertically by default) for comments,
> would that on the one hand slightly increase (as a percentage) its
> reputation for obscurity among Western programmers but on the other
> dramatically increase its penetration in China (an enormous market)?
> >
> > Seriously: I’m an amateur and maybe this goes away with expert status,
> but my own J is no longer readable-at-a-glance after a day or two.  I’ve
> often wondered whether a J-friendly editor could act as a crutch* in that
> regard.  Most programming languages are line-oriented in the sense that one
> comment per line is adequate.  J is token-oriented in that each character
> speaks volumes and may deserve its own annotation.  Typical (line-oriented)
> editors aren’t set up to support that gracefully.  (I’m not telling you
> anything you don’t know; I imagine this discussion has come up before.)
> >
> > And, no, I don’t know what such an editor would look like beyond saying
> that it would be really freaking cool.  As Wally once told the
> Pointy-Haired Boss, “It’s my job angrily to point out problems!”  (Though
> to be clear, I’m actually perfectly happy.  If I really can’t understand
> what I wrote, I just rewrite it from scratch.  :-) )
> >
> > Ed
> >
> > *Crutch n. A thing used for support or reassurance.  May hold you back
> in the long term.
> >
> > Ed
> >
> > Sent from my iPad
> >
> >> On Apr 27, 2022, at 7:01 PM, Hauke Rehr <hauke.r...@uni-jena.de> wrote:
> >>
> >> What keeps you from writing your comments vertically‽
> >>
> >>> Am 27.04.22 um 14:50 schrieb Ed Gottsman:
> >>> If J were written vertically, it might be easier to comment.
> >>
> >> --
> >> ----------------------
> >> mail written using NEO
> >> neo-layout.org
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> --
> ----------------------
> mail written using NEO
> neo-layout.org
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to