Alternative single line comment character(s)

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

Alternative single line comment character(s)

Post by Clyde »

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 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair »

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: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Alternative single line comment character(s)

Post by plouf »

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 ;)
Christos
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde »

@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 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair »

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: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde »

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 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Alternative single line comment character(s)

Post by airsoftsoftwair »

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: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: Alternative single line comment character(s)

Post by Clyde »

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 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
Post Reply