Bay Six Software Forum Index Bay Six Software
Beyond the Basics
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Block comments

 
Post new topic   Reply to topic    Bay Six Software Forum Index -> ViviFire language
View previous topic :: View next topic  

Which do you like?
'< ... >'
0%
 0%  [ 0 ]
/' ... '/
50%
 50%  [ 1 ]
/* ... */
50%
 50%  [ 1 ]
None of the above
0%
 0%  [ 0 ]
Total Votes : 2

Author Message
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: May 19th, 2012, 5:35pm    Post subject: Block comments Reply with quote

I'm not sure anymore that I like the syntax for block comments that I selected a while ago. For that reason, I'm making it a popularity contest.

Please choose one of the provided options above or suggest one of your own. Examples follow.
Code:
'<
Option #1
>'

/'
Option #2
'/

/*
Option #3
*/

This poll will run for 30 days.

_________________
Brent
Back to top
View user's profile Send private message Send e-mail
STPendl
Full Member


Joined: 20 Aug 2007
Posts: 161
Location: Austria

PostPosted: May 19th, 2012, 6:58pm    Post subject: Re: Block comments Reply with quote

How about the following?

Code:

'{
Option #4
'}

_________________
Stefan

Any code I post can be freely used, just give credit.
Back to top
View user's profile Send private message
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: May 19th, 2012, 8:03pm    Post subject: Re: Block comments Reply with quote

Stefan, that looks fine for a multi-line comment, but I'm not so sure about a middle-of-the-line comment, though that's quite rare. Another aspect that I think makes a good commenting syntax is how easy it is to type. IMO, the harder you make it to comment code, the less programmers want to do it. Many BASIC proponents say they prefer the language because it rarely forces them to press the Shift key. The C-style comment can avoid the Shift key if you use the numeric keypad, but with the greater popularity of laptops these days, that convenience is diminishing.
_________________
Brent
Back to top
View user's profile Send private message Send e-mail
STPendl
Full Member


Joined: 20 Aug 2007
Posts: 161
Location: Austria

PostPosted: May 20th, 2012, 9:03am    Post subject: Re: Block comments Reply with quote

On my German keyboard I have to use the [Alt Gr]-key (right [Alt]-key) to access the following keys: @ | { [ ] } \ ~
The [Shift]-key must be used for these: ! " $ % & / ( ) = ? * ' ; : _
This tells us that a German keyboard isn't developer-friendly at all.

The only good thing is the separate numerical keypad that my 17" wide-screen notebook offers.
This would allow me to create the C-like block comment with single key presses.

For the middle of the line comments I would use the single line comment character (apostrophe) (have to look, if there is one).

I have never started a multi line comment in the middle of a line, that looks really strange.

_________________
Stefan

Any code I post can be freely used, just give credit.
Back to top
View user's profile Send private message
tsh73_cannot_log_in
Guest





PostPosted: May 21st, 2012, 7:48am    Post subject: Re: Block comments Reply with quote

gosh, I have a problem logging - so no poll for me. Anyway.
(If I think about adding multiline comment in BASIC) I would choose a syntax there start / end marker looks like a comment to BASIC (and BASIC programmer) (like Stefan suggestion).
Well, this language is not BASIC , so you as well might choose something different.
Why don't use some common convention, tried by other languages then?
C-ctyle option #3 looks fine, and many people will recognize it from the start.
Pascal has just {for comments}, and this way you never lose half of comment marker - unless your language uses {} for something else?
As for {} harder to type - well, show me single C/C++ programmer complaining about that Wink Don't see a problem really.
Back to top
tsh73_cannot_log_in
Guest





PostPosted: May 21st, 2012, 7:51am    Post subject: Re: Block comments Reply with quote

>>Many BASIC proponents say they prefer the language because it rarely forces them to press the Shift key.
Never ever heard of that. Really, sounds like utter noncence for me.
Back to top
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: May 21st, 2012, 9:20pm    Post subject: Re: Block comments Reply with quote

tsh73_cannot_log_in wrote:
gosh, I have a problem logging - so no poll for me.

Please try clicking the link that reads "I forgot my password." If that doesn't work, please post to the General Discussions forum.

_________________
Brent
Back to top
View user's profile Send private message Send e-mail
Brent
Site Admin


Joined: 01 Jul 2005
Posts: 797

PostPosted: May 21st, 2012, 9:27pm    Post subject: Re: Block comments Reply with quote

tsh73_cannot_log_in wrote:
>>Many BASIC proponents say they prefer the language because it rarely forces them to press the Shift key.
Never ever heard of that. Really, sounds like utter noncence for me.

Well, I think that person was refering to Visual Basic, which discourages the use of the old sigils ($, %, &, etc).

_________________
Brent
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Bay Six Software Forum Index -> ViviFire language All times are GMT
Page 1 of 1
Jump to:  
Quick Reply
Username:
Message:
   Shortcut keys: Alt+Q to activate, Alt+P to preview, Alt+S to submit
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Lo-Fi Version
Powered by phpBB © 2001, 2005 phpBB Group