Project

General

Profile

Actions

Feature #20405

open

Inline comments

Added by nobu (Nobuyoshi Nakada) 30 days ago. Updated 14 days ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:117392]

Description

I propose a new inline comment syntax.

p (| This is a comment (| and nested one |) /:|) (:|) #=> :|

Updated by vo.x (Vit Ondruch) 29 days ago

I like this proposal. But there are other possibilities, such as:

(: This is comment :)

That would just underline Ruby as a "happy" language. Of course variants such as (-: ... :-) or even (o: ... :o) could even extend the expressiveness of comments

Updated by nobu (Nobuyoshi Nakada) 29 days ago

vo.x (Vit Ondruch) wrote in #note-1:

I like this proposal. But there are other possibilities, such as:

(: This is comment :)

Thank you for the comment, but you may know (: can conflict existing code.
The reason I selected (| is that /:|) is used as Matz's face (no beard version).

Updated by matheusrich (Matheus Richard) 14 days ago ยท Edited

I think, unironically, this could be a nice addition. Maybe with a syntax closer to the current comments?

p #= This is a comment #= and nested one =# =# :| # => :|
Actions

Also available in: Atom PDF

Like2
Like0Like0Like0