Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Block comments ala Ray
- X-seq: zsh-workers 47992
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Block comments ala Ray
- Date: Wed, 10 Feb 2021 07:16:26 +0100
- Archived-at: <https://zsh.org/workers/47992>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/CAN%3D4vMonpZHPSarsC778_GMbD_h4ioTwT%2BbTFU%3DFZ7_zbXaMqQ%40mail.gmail.com>
- In-reply-to: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com>
On Wed, Feb 10, 2021 at 7:05 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> The comment ends after a line containing #! anywhere in the line. So
> a full block could be:
>
> !# This begins a block comment.
> This is merely rambling.
> This #! is the last line of the block
This can be very surprising because it's not how block comments work
in other popular languages. It also disallows inline comments --
something I personally use in other languages.
foo(/* bar_count */ 42);
I would go even further and say that the value provided by block
comments resides almost exclusively in enabling inline comments. If a
comment consists of several full lines, very little is gained (if
anything at all) by using block comments.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author