8 Replies - 12415 Views - Last Post: 14 October 2012 - 08:58 PM

#1 Braber01  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 247
  • Joined: 29-November 08

VB Muliti-Line Comment? Want/ Don't want?

Posted 09 April 2012 - 04:29 PM

I personally would Love it if Microsoft put in a Multi-Line Comment for VB I was wondering what are your opinions?
Is This A Good Question/Topic? 1
  • +

Replies To: VB Muliti-Line Comment? Want/ Don't want?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5439
  • View blog
  • Posts: 11,669
  • Joined: 02-June 10

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 09 April 2012 - 05:38 PM

so you can't do something similar to this...

/* 
   Comment 1
   Comment 2
   Comment 3
*/


...like we do in C# ?
Was This Post Helpful? 0
  • +
  • -

#3 Braber01  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 247
  • Joined: 29-November 08

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 09 April 2012 - 05:49 PM

Yes Something Like that All the Other .NET Languages have Multi Line Comments Even F# like
(*
comment 1
comment 2
comment 3
*)
Just wanted to know what other people thought


This post has been edited by Braber01: 09 April 2012 - 05:49 PM

Was This Post Helpful? 0
  • +
  • -

#4 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2241
  • View blog
  • Posts: 9,412
  • Joined: 29-May 08

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 10 April 2012 - 02:03 AM

Remember that Visual Basic is more line orientated than the rest of the .net languages. The end of the line indicating the end of that statement, which is why Visual Basic has a Line Continuation character _ that let statements span multiple lines.

I don't think the small benefits of multi-line comments would out weigh the time to neeed to add them the language. Plus remember the IDE allows you to select multiple lines and comment / uncomment them.

Quote

All the Other .NET Languages have Multi Line Comments

I don't think your case is strong enough.
If you're going to pick stuff from other language then pick stuff that make programmers life's better, like Iterators. VB developers have been ask for the for years and years and final they'll get them in the next release.

Consider the following examples, and what they added to the language.
  • XML Literals (VS2008)
  • Implicit line continuations (VS2010)
  • Async & Await (VS11)

Now ask yourself what do multi-line comments add to the language?

This post has been edited by AdamSpeight2008: 10 April 2012 - 02:58 AM

Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5439
  • View blog
  • Posts: 11,669
  • Joined: 02-June 10

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 10 April 2012 - 09:01 AM

if the language is so lacking, and it has taken so long to bring in features the other .NET languages already have... Then what is the appeal? I would have figured people to just switch from VB.NET to C# so they can pick up all the missing capabilities.
Was This Post Helpful? 0
  • +
  • -

#6 Braber01  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 247
  • Joined: 29-November 08

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 10 April 2012 - 10:58 AM

I have picked up both however my school doesn't offer an Advanced C# course :(
Was This Post Helpful? 0
  • +
  • -

#7 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 09 May 2012 - 11:17 AM

View PosttlhIn`toq, on 10 April 2012 - 11:01 AM, said:

if the language is so lacking, and it has taken so long to bring in features the other .NET languages already have... Then what is the appeal? I would have figured people to just switch from VB.NET to C# so they can pick up all the missing capabilities.

I wouldn't call a language "lacking" because it has a different approach to whitespace. C# has brackets and semicolons to demarcate code and code blocks, VB doesn't. VB assumes that all characters on a given line are one line of code, thereby obviating the need for those annoying semicolons. (I personally don't find them annoying, just putting out a POV.) I like working with either.

I can do multiline comments just fine:
'Here is my multiline comment.
'I have some more comments on the next line, see?
'And now here are some more!
If I want to comment out multiple lines of code, and don't feel like running through and putting apostrophes all through it, I highlight it and select "comment out selected lines of code" from the text editor toolbar. I do that in C#, too, wouldn't want to get into an accident with a literal * in a regular expression or something...

As for "all the missing capabilities", I'm not familiar with any except the ability to write "unsafe" code. I claim ignorance on this however; thlin might wish to expand the list to make his point a bit more strongly. :)

This post has been edited by BobRodes: 09 May 2012 - 11:22 AM

Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2241
  • View blog
  • Posts: 9,412
  • Joined: 29-May 08

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 09 May 2012 - 12:29 PM

Quote

VB assumes that all characters on a given line are one line of code,

That's distinction is a little bit blurry now, since VB10 (vs2010) has implicit line-continuations, and multi-line lambdas.
A "line of code" can span multiple lines.

If you also include xml-literals then, the xml part is using a different parsing rules to the regular vb.net ones.
Was This Post Helpful? 0
  • +
  • -

#9 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: VB Muliti-Line Comment? Want/ Don't want?

Posted 14 October 2012 - 08:58 PM

I make use of the "block comment" in VS 2010 quite a lot, and while a multiline comment might be marginally useful, I would not want to lose the block comment facility. One thing I REALLY like about the block comment is that I can comment a block, then uncomment a few lines in it. I do this quite often, and it's something that can't be easily done with a multiline comment.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1