Hi Sergey,
Your version of Note will break the current dyadic design of Note as
described in the stdlib.ijs script (see extract below)
http://www.jsoftware.com/wsvn/base8/trunk/main/main/stdlib.ijs

Currently the dyadic form causes Note to render the rest of the current
line as a "comment". Your version will cause the Note to be multiline in
both the monadic and dyadic forms.

Personally I quite like your version given that I tend to use (NB.) rather
than dyadic (Note) and it would then "standardise" Note as the method for
making multiline comments.

The question is how common the dyadic use of Note is and therefore how much
legacy code the change would break?

NB.-
NB.-*Monadic form:*
NB.-
NB.-This enables multi line comments without repeated NB.-and
NB.-requires a right parenthesis in the first column of a line to
NB.-close. The right argument may be empty, numeric, text, or any
NB.-noun. Reads and displays the comment text but always returns an
NB.-empty character string so the comment is not duplicated on screen.
NB.-
NB.-The right argument can number or describe the notes, e.g.
NB.-
NB.+  Note 1     Note 2.2   or    Note 'The special case' etc.
NB.-
NB.-*Dyadic form:*
NB.-
NB.-This permits a single consist form of comment for any lines which are
NB.-not tacit definitions. The left argument must be a noun. The function
NB.-code displays the right argument and returns the left argument.
NB.-
NB.-example:
NB.+Note 1
NB.+... note text
NB.+)
NB.
NB.+   (2 + 3)=(3 + 2) Note 'addition is commutative'


On Thu, Jul 26, 2018 at 10:27 AM, Sergey Kamenev <jsof...@inetstar.ru>
wrote:

> Hi!
>
> Currently:
>
> Note
> 3 : '0 0 $ 0 : 0' :[
>
> Example:
>
> Note 'Details'
>   bla-bla
> )
>
> My variant:
> Note =: 3 : '0 0 $ 0 : 0' : $:@]
>
> Allow old and new variant:
>
> 1 Note 'Introduction'
>   bla-bla
> )
>
> 2 Note 'Details'
>   bla-bla
> )
>
> Note 'Old'
>   bla-bla
> )
>
>
> Nice day!
> Sergey
>
> ----------------------------------------------------------------------
> 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