473,748 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3040
Tim,

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

Cor

Nov 21 '05 #2
"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:e1******** ******@TK2MSFTN GP14.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*****@hotmai l.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*****@hotmai l.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*****@hotmai l.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
6911
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 = '\/'.join(s.split('/'))
3
15873
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 : "\\x20\\x01\\x21"
10
1990
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", some of the Python libraries functions (a few of the os and os.path calls). Note: if you're going to reply, please read it *all* before doing so -- I've already explored this problem quite a bit, and found no obvious solution to it yet.
15
3530
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
5246
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: http://linux04.bla.blabla.com:18088//LM_SoapServices/BaanRequest.wsdl ..NET automatically replaces the "//" with a "/" and therefore the call fails. Setting the "Url" property of the web service proxy class at runtime
23
13519
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 = "\\wusais\Intranets\Intranets\fpdb\pdf\weinig\00505882.pdf"; $new = preg_replace("\\", "\\\", "$var"); ?> Code above produces the following error:
29
2965
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 bug , i am still c++ beginner
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9562
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.