-
Dec 13th, 2007, 03:44 PM
#1
Thread Starter
Hyperactive Member
VB Shorthand?
Hello,
Thank you for visiting the forums here. Perhaps, even after the week you might pop in occasionally?
I use Visual Basic 2005 at work a lot because it is verbose and my boss can read and have a basic understanding of what I am doing. However, one of the things I really like about C# is the brevity. For example:
Code:
Int? x = null;
Int y = 30;
Int z = x ?? y;
Is there any plans for this kind of ability to be added to Visual Basic? Perhaps, the option to write out the code verbosely, or use a "short hand" way?
Thank you for your answer.
Ben
Using Visual Basic 2005/2008
-
Dec 13th, 2007, 04:29 PM
#2
Re: VB Shorthand?
That makes no sense at all,
you said you use VB because it is verbose, then you ask it to not be.. while also pointing out that c# is not verbose thus facilitating your shorthand needs.
So where is the problem? Vb=Readible C#=Short you already have the choice.
-
Dec 13th, 2007, 06:13 PM
#3
Re: VB Shorthand?
I kind of like short operators, but I do appreciate the readability of VB, so I'd have to say that I'm pretty much with Phill64 on this one. After all, in C you can write some amazing lines, but reading them is such a CHORE!!
However, the trinary operator would be a nice touch.
My usual boring signature: Nothing
-
Dec 13th, 2007, 08:05 PM
#4
Thread Starter
Hyperactive Member
Re: VB Shorthand?
I am saying that I would like the option. In C# you don't have to use the "short hand", but it is available. It is an option. Why not make that an option in VB?
This would be beneficial, to me anyway, when I don't need my boss to understand what I am writing. My boss can't read C# either way, but if this was available in VB, then I could choose when I want to code verbosely, and when I don't. Speed vs. readability. Seems logical to me.
Ben
Using Visual Basic 2005/2008
-
Dec 13th, 2007, 08:09 PM
#5
Re: VB Shorthand?
Originally Posted by Shaggy Hiker
However, the trinary operator would be a nice touch.
Doesn't VB 2008 now have an If operator? Don't have it installed here at work but I thought they'd added one.
-
Dec 13th, 2007, 08:55 PM
#6
Re: VB Shorthand?
they did.... if you look at my thread about Lambda Expressions, Beth used the new If operator in one of the examples.
-tg
Last edited by techgnome; Dec 13th, 2007 at 08:55 PM.
Reason: It's expressions, not equasions
-
Dec 13th, 2007, 11:37 PM
#7
Special Guest - Microsoft
Re: VB Shorthand?
Good to know you like the short operators.
FWIW, we hear a bit more feedback to the other side that users like the readability of the operators and keywords we currently have with VB. Plus, we have to think about the long history we've had with the language.
-
Dec 14th, 2007, 11:08 AM
#8
Thread Starter
Hyperactive Member
Re: VB Shorthand?
I do, a lot. Thank you for your response.
I know I am odd!
Ben
Using Visual Basic 2005/2008
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|