Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Block comments ala Ray



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