<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi,<br>
<br>
as some of you may have noticed in the GNU APL source code, I am a
big fan of Doxygen.<br>
The ⍝⍝ idea adopts the practice of Doxygen to repeat the last
character of comment markers<br>
in a language (Doxyge supports several languages today, but not
(yet) APL).<br>
<br>
In C we have short (1-line) <font face="Courier New, Courier,
monospace"><b>//</b></font> comments and long (1 or more line)
<b><font face="Courier New, Courier, monospace">/* .. *</font>/ </b>comments.
The corresponding<br>
Doxygen comments are therefore <font face="Courier New, Courier,
monospace"><b>///</b></font> (short) and <font face="Courier
New, Courier, monospace"><b>/** ... */</b></font> (long).<br>
<br>
Since APL has no multiline comments we have only <b>⍝</b> and
then <b>⍝⍝</b> would be the corresponging Doxyhen marker.<br>
<br>
If course we can make the <b>)</b><b>HELP</b> mechanism tolerant
to support different markers at the same time. But the rules<br>
should be understoof and fixed before I start with the
implementation.<br>
<br>
What I don't like is when the start marker is the same as the end
marker, because it introduces useless error<br>
cases (like missing end marker).<br>
<br>
I would also argue that we should separate two things:<br>
(1) the distinction between code extraction comments and normal
comments, and<br>
(2) the tagging inside a </font><font face="Helvetica, Arial,
sans-serif">code extraction comment.<br>
<br>
(1) should follow the language (i.e. APL) rules while (2) follows
the code extraction rules.<br>
<br>
Following that would make:<br>
<br>
</font><font face="monospace, monospace">⍝ Begin a transaction.</font><font
face="Helvetica, Arial, sans-serif"><br>
<br>
a normal comment.<br>
</font><br>
BTW for those of you looking for coding tasks, contributing APL
support to Doxygen would<br>
be a useful thing to do. I felt like doing that myself, but I
haven't found the time to do it yet.<br>
<br>
Best Regards,<br>
Jürgen Sauermann<br>
<br>
<font face="Helvetica, Arial, sans-serif"><br>
Which would make . a start/end marker.<br>
</font><font face="Helvetica, Arial, sans-serif"><br>
</font>
<div class="moz-cite-prefix">On 04/18/2017 04:56 AM, Elias Mårtenson
wrote:<br>
</div>
<blockquote
cite="mid:CADtN0W+YGnsyMF-sVZZyKQJbmhs_HD9aLP=***@mail.gmail.com"
type="cite">
<div dir="ltr">Sorry for following up to my own email, but I
forgot to mention one thing:
<div><br>
</div>
<div>I have absolutely no particular attachment to the choice of
using ⍝⍝. I'm OK with any format, but the important part is
that it's clearly distinct from any normally occurring
comments or code.</div>
<div><br>
</div>
<div>If I remember correctly, this was discussed several years
ago and one of the proposals was to use ⍝-, like this:</div>
<div><br>
</div>
<div>
<div><font face="monospace, monospace">∇Z←SQL∆Begin db</font></div>
<div><font face="monospace, monospace">⍝-<br>
</font></div>
<div><font face="monospace, monospace">⍝ Begin a transaction.</font></div>
<div><font face="monospace, monospace">⍝-<br>
</font></div>
<div><font face="monospace, monospace">⍝ This is a normal
comment that is not part of the documentation.<br>
</font></div>
<div><font face="monospace, monospace"> Z←⎕SQL[5] db</font></div>
<div><font face="monospace, monospace">∇</font></div>
</div>
<div><br>
</div>
<div>I personally find the ⍝⍝ format to be more readable though,
but that's just my personal taste.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Elias</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 18 April 2017 at 10:49, Elias
Mårtenson <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:***@gmail.com" target="_blank">***@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello David,
<div><br>
</div>
<div>Having a standardised format is what makes this so
useful. The whole point of this is to make sure that
everybody uses the same convention so third-party tools
can integrate with the system. If everybody “adopts the
convention they prefer”, as you suggest, such a system
would not be very useful. With regards to the format, I
think you are exaggerating the complexity a bit. It's
really only two rules:</div>
<div>
<ol>
<li>The documentation block is prefixed by ⍝⍝</li>
<li>The first line is the short summary.</li>
</ol>
<div>Using a special format to describe documentation is
very important. The reason is that <i>you absolutely
don't want to display “normal” comments as
documentation</i>. Using ⍝⍝ tells the system that
the person who wrote the documentation intended this
to be documentation, and not just merely a plain
comment.</div>
</div>
<div><br>
</div>
<div>The Emacs mode dynamically pops up this documentation
string whenever the cursor is on top of a function name,
and you really don't want arbitrary comments to be
displayed there.</div>
<div><br>
</div>
<div>This system of having dedicated documentation strings
is very well established in multiple languages, for
example:</div>
<div>
<ul>
<li>Java (uses /**)</li>
<li>C++ (doxygen, uses /**)</li>
<li>Python (uses triple-quote """like this""". An
empty string conveniently is a no-op in Python)</li>
<li>Common Lisp ("a plain string" as the first form,
like Python this ends up being a no-op)</li>
<li>Emacs Lisp (same syntax as Common Lisp, the
documentation is tightly integrated in the help
system)</li>
</ul>
<div>As you can see, this is nothing new, and has proven
to be incredibly useful in multiple languages.</div>
</div>
<div><br>
</div>
<div>Finally, this is not merely a good idea. It's also
actively working in the GNU APL Emacs mode today, and if
you want to have integrated documentation in the editor
you need to follow this convention anyway.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Elias</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 18 April 2017 at 09:05,
David B. Lamkins <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:***@lamkins.net" target="_blank">***@lamkins.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Thank
you to everyone who contributed to the recent
extension to )HELP. This'll be far more convenient
that flipping between APL and two PDF references.<br>
<br>
Regarding help for user-defined functions, I'd
like to offer a suggestion:<br>
<br>
I've noticed quite a bit of talk about adopting
syntax and/or semantics (e.g. tags) from the
conventions used by other languages and
documentation extractors.<br>
<br>
I'd like to suggest that it's in everyone's
interest for the format of header comments to
remain as neutral as possible, leaving open the
possibility for everyone to adopt (or invent)
whatever convention they prefer.<br>
<br>
The way I see it, the only real concern should be
how to delimit the end of a header comment. I'd
like to suggest that every lamp line starting with
the first line of the function is a header comment
regardless of indentation or markup. The end of
the header comment is simply the first non-lamp
line; this could be either a line of APL code or
an empty line (and I prefer visual equivalence, so
a line of only whitespace would be considered
empty for this purpose). If the first line of the
function is visually empty or a line of APL code,
then the function has no header comment.<br>
<br>
Again, thanks!<br>
<span class="m_-1944483128219150452HOEnZb"><font
color="#888888"><br>
David<br>
<br>
--<br>
I've found my niche. If you're wondering why
I'm not there, there was<br>
this little hole in the bottom ...<br>
-- John Croll<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>