Alternative single line comment character(s)

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Clyde
Posts: 144
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Alternative single line comment character(s)

Post by Clyde » Wed Jun 12, 2019 2:15 pm

This may sound foolish, but using languages like PHP, JavaScript and sometimes C# on a daily basis seeing the semicolon (;) used for single line comments bugs me really a lot. I know it is a matter of familiarization but to me those ; comments make the code hard to read.

So, for the sake of my mental health ;-) would it be possible if you could add double slashes (//) as allowed comment characters for single line comments (don't get rid of the semicolon, of course, "just" also allow //).

Thanks a lot!
Currently using: Hollywood 7.1 with Windows IDE

User avatar
airsoftsoftwair
Posts: 2985
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair » Wed Jun 12, 2019 4:37 pm

I'm afraid that's not very likely because it also means that the syntax highlighter in the Hollywood IDE, in Flow Studio, in the Cubic IDE plugin, in the UltraEdit and Notepad++ and vim plugins would have to be adapted which is a lot of work. Especially the syntax highlighter in the Hollywood IDE is something I'd prefer not to touch again ;) Besides that, I'm also a fan of the semicolons as comments :)

plouf
Posts: 53
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Alternative single line comment character(s)

Post by plouf » Wed Jun 12, 2019 6:26 pm

agree with aisoftware

i come from a "background" where ; is the comments (blitzbasic / purebasic / a lot of Assemby's)
so for "us" this is logic and "we" have to familize with something else ;)

User avatar
Clyde
Posts: 144
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde » Thu Jun 13, 2019 9:53 am

@plouf: I understand that. But keep in mind that I don't want the ; to vanish. I just want an additional alternative.

@Andreas: I see your point. To be honest, I wouldn't care if the syntax highlighting would not work in this case, as long as the compiler does not complain and it works as intended. Maybe implement it as a hidden feature? :-) Btw, I am currently working on a (simple) Hollywood plugin for Visual Studio Code (which is a great editor), so adding // as a single line comment works like a snap in seconds ...
Currently using: Hollywood 7.1 with Windows IDE

User avatar
airsoftsoftwair
Posts: 2985
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair » Thu Jun 13, 2019 7:22 pm

Clyde wrote:
Thu Jun 13, 2019 9:53 am
@Andreas: I see your point. To be honest, I wouldn't care if the syntax highlighting would not work in this case, as long as the compiler does not complain and it works as intended. Maybe implement it as a hidden feature? :-)
Sorry, that's just too modern. There has to be some retro touch to Hollywood ;-) Btw, in C the // comments weren't available before C99 either :)

User avatar
Clyde
Posts: 144
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde » Fri Jun 14, 2019 3:14 pm

airsoftsoftwair wrote:
Thu Jun 13, 2019 7:22 pm
Sorry, that's just too modern. There has to be some retro touch to Hollywood ;-) Btw, in C the // comments weren't available before C99 either :)
Gnaaaaaaahhh! :-)

Ok, if you want to go this route :-) : With creating Hollywood you have always show how far ahead you are against other technologies! Hollywood is more modern than most other stuff. So, keep the ; for the retro touch and add // for modernness. :-) And I am quite sure, at least the files for UltraEdit, Notepad++ and VIM are easy to extend.
I could not test it with VIM, but this should be the regex für the VIM syntax hightlighter (see file hollywood.vim, line 126):

Code: Select all

(;|\/\/).*$
See also https://regex101.com/r/ytFKug/1

:-)
Currently using: Hollywood 7.1 with Windows IDE

User avatar
airsoftsoftwair
Posts: 2985
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair » Fri Jun 14, 2019 7:30 pm

Have I mentioned that another advantage of ; is that it is much quicker to type and only needs half as much space which also increases the compiler's performance :)

User avatar
Clyde
Posts: 144
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde » Fri Jun 14, 2019 10:24 pm

Nope, you haven't and it really sounds like an excuse. :-P :-D

All the other people can continue to enjoy the performance boost when using ; and I happily wait a bit more while compiling and enjoy using // ... :-)
Currently using: Hollywood 7.1 with Windows IDE

Post Reply