473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Double slash as a comment prefix in VB

Does anyone else think VB should support the // prefix for comments? I keep
using it by accident, because so many other languages use it (unlike the
single quote, which is I believe unique to VB).

If you think VB would be improved by this change, please vote on my
suggestion here:

http://lab.msdn.microsoft.com/Produc...ckId=FDBK15038

Thanks!

Tim
Nov 21 '05 #1
9 3018
Tim,

Do you not have a better sugestion than that \\ in C type languages?

Cor

Nov 21 '05 #2
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:e1**************@TK2MSFTNGP14.phx.gbl...
Tim,

Do you not have a better sugestion than that \\ in C type languages?


// you mean.

But no, I like the double slash.

Tim
Nov 21 '05 #3
* "Tim Anderson" <ti*****@hotmail.com> scripsit:
Does anyone else think VB should support the // prefix for comments? I keep
using it by accident, because so many other languages use it (unlike the
single quote, which is I believe unique to VB).

If you think VB would be improved by this change, please vote on my
suggestion here:

http://lab.msdn.microsoft.com/Produc...ckId=FDBK15038

I voted against this suggestion. In VB.NET, there are already two ways
of starting comments, ''' and 'Rem', and in VB 2005, ''''' for XML
comments. I am strongly against a change of this scheme. Comment
blocks would be nice, but I currently do not have an idea about how to
add them to the language without producing ASCII art ('/*...*/' is
horrible).

What I can think of is an automatical replacement of '//', that turns
'//' into '''. This would keep the language syntax clean and would help
C* programmers to switch to VB.NET.

It's interesting that, as a VB programmer, I never had any problems with
C* languages. There is nothing simpler than remembering the comment
character.

'//' does not fit into the scheme used to choose keywords in VB. It's
ASCII art.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4
* "Tim Anderson" <ti*****@hotmail.com> scripsit:
Do you not have a better sugestion than that \\ in C type languages?


// you mean.

But no, I like the double slash.


Out of the same reason a VB programmer could demand ''' as character
starting sequence in C. Unification is only useful as long it doesn't
destroy schemes introduced with a certain programming language. '//'
would not comply with the "spirit of Visual Basic".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #5
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2q************@uni-berlin.de...
What I can think of is an automatical replacement of '//', that turns
'//' into '''. This would keep the language syntax clean and would help
C* programmers to switch to VB.NET.
Could be useful.
'//' does not fit into the scheme used to choose keywords in VB. It's
ASCII art.


You will have to work hard to persuade me that ' is any more intuitive. REM
is true BASIC style I agree, but who wants to type four characters where one
or two will do?

Tim
Nov 21 '05 #6
Tim,

* "Tim Anderson" <ti*****@hotmail.com> scripsit:
What I can think of is an automatical replacement of '//', that turns
'//' into '''. This would keep the language syntax clean and would help
C* programmers to switch to VB.NET.


Could be useful.
'//' does not fit into the scheme used to choose keywords in VB. It's
ASCII art.


You will have to work hard to persuade me that ' is any more intuitive. REM
is true BASIC style I agree, but who wants to type four characters where one
or two will do?


Why two characters if one character is enough? IMHO, '//' distorts the
visual appearance of code. ''' makes it look more untroubled. So, why
do you want to type two characters when already one will do?

(I am member of the movement that wants '>>' to be replaced with 'Shr'
and '<<' to be replaced with 'Shl'.)

SCNR

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #7

"Tim Anderson

Do you not have a better sugestion than that \\ in C type languages?


// you mean.

You see I always make mistakes in that

:-)

Cor
Nov 21 '05 #8
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2q************@uni-berlin.de...
Why two characters if one character is enough? IMHO, '//' distorts the
visual appearance of code. ''' makes it look more untroubled. So, why
do you want to type two characters when already one will do?


Because I want comment lines to look different from code lines. The ' is
almost invisible.

Typing the same character twice is very quick, similar to double-click with
the mouse :-)

Tim


Nov 21 '05 #9
I suppose you know that you can set you comment lines to different colors,
but unfortunately, I don't believe they will print in color nor copy to a
document in color. It would be nice to have comment blocks though.

"Tim Anderson" wrote:
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2q************@uni-berlin.de...
Why two characters if one character is enough? IMHO, '//' distorts the
visual appearance of code. ''' makes it look more untroubled. So, why
do you want to type two characters when already one will do?


Because I want comment lines to look different from code lines. The ' is
almost invisible.

Typing the same character twice is very quick, similar to double-click with
the mouse :-)

Tim


Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Aloysio Figueiredo | last post by:
I need to replace every ocurrence of '/' in s by '\/' in order to create a file named s. My first attempt was: s = '\/'.join(s.split('/')) but it doesn't work: >>> s = 'a/b' >>> s =...
3
by: Vincent Texier | last post by:
Hello, I want to send 3 chars in hexa code to the serial port. So I type in a tkinter entry : "\x20\x01\x21" The string is set in a StringVar(). When I read the stringVar, I get :...
10
by: Carlos Ribeiro | last post by:
Hello all. I'm sending this to the list because I would like to know if someone else has ever stumbled across this one, and also because one possible solution is to patch, or simply "decorate",...
15
by: Riko Wichmann | last post by:
Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ Thanks,
6
by: Benjamin Janecke | last post by:
Hi, I have to call a java-written soap webservice from a .NET client application. Unfortunately, the URL contains of a double slash "//", as u can see in this example: ...
23
by: dkirkdrei | last post by:
I am having a bit of trouble trying to double up on slashes in a file path. What I am trying to do is very similar to the code below: <? $var =...
29
by: Virtual_X | last post by:
As in IEEE754 double consist of sign bit 11 bits for exponent 52 bits for fraction i write this code to print double parts as it explained in ieee754 i want to know if the code contain any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.