Project

General

Profile

Actions

Feature #13393

closed

New comment syntax

Added by nobu (Nobuyoshi Nakada) about 7 years ago. Updated about 7 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:80518]

Description

Now ruby has 2 comment syntax, #... and =begin..=end, but they are line-oriented both.
This is a proposal of a new, very visible, inline comment syntax.

Turning on highlight mode (i.e., \e[1m) starts a comment and turning off (i.e., \e[m) ends it.
This visualizes comments very much.

https://github.com/nobu/ruby/tree/feature/highlight-comment


Files

comment-ng.png (63.2 KB) comment-ng.png current version nobu (Nobuyoshi Nakada), 04/01/2017 07:09 AM
comment-ok.png (24.6 KB) comment-ok.png proposed version nobu (Nobuyoshi Nakada), 04/01/2017 07:10 AM

Updated by normalperson (Eric Wong) about 7 years ago

wrote:

Turning on highlight mode (i.e., \e[1m) starts a comment and turning off (i.e., \e[m) ends it.
This visualizes comments very much.

+1 Please commit ASAP. This speeds up the parser 300% and load
times on my app decreased by 41%. There is also huge memory
savings, too!

Updated by ko1 (Koichi Sasada) about 7 years ago

We should use such syntax for literal syntax such as frozen one (with blue color).

Updated by shevegen (Robert A. Heiler) about 7 years ago

I like colours. Even on first april so I have to take it almost literally as a real proposal.
(Actually after waking up, I forgot which day it was; the Assignee set here helped me
understand the proposal. :D )

It's one of the few things I like about cmake - while autoconf makes it more convenient for
people to adapt their project via readable commandline-switches (as opposed to cmake -D
something such as -DCMAKE_INSTALL_PREFIX= versus configure --prefix= ), the default colours
used by cmake are IMO quite nice.

Updated by stomar (Marcus Stollsteimer) about 7 years ago

I'd like to see colors allowed in method names. In the long run, all "bang methods" could be replaced by "red methods", to even better visually signal their dangerousness.

But I guess this would probably go beyond the scope of this feature request, so I will prepare a separate ticket...

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

ko1 (Koichi Sasada) wrote:

We should use such syntax for literal syntax such as frozen one (with blue color).

OK, updated.

Actions #6

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0