In the vein of Most Wanted Feature for C# 4.0, what would you like to see in the next version of VB.NET?
Why? What's wrong with (multiline) statement lambdas?
Konrad Rudolph
2008-10-03 16:26:47
VB limits you to a single line.
Bob King
2008-10-03 16:28:09
Not much longer, according to Paul Vick's blog! Multiline lambdas were originally planned for Version 9 but didn't make it due to deadlines.
Konrad Rudolph
2008-10-03 16:34:46
Whoo hoo! That makes me pretty happy. I always thought that was the biggest slap in the face.
Bob King
2008-10-03 16:36:14
+3
A:
Two categories.
C# catchup
- An analog for C#'s yield keyword
- An analog for C#'s better nullable type support
- Auto properties
- unsafe code
New features
- Multiple setters for properties (IE: you could have a Uri property that lets you have separate setters that accept a Uri type and a String type, and it uses the type inference system to know which you mean to use. Of course, the setter would have to know how to convert the passed string and store it in the Uri backing the property)
- Real String enums
- Multi-line statements (ie, You can start any line with a semi-colon, which is ignored except that then the statement does not end until the parser reaches another semi-colon). It would be great for long string literals, for example, or for multi-line lambdas/delegates.
Joel Coehoorn
2008-10-03 16:29:53
Cool! learn something new every day. Question edited to reflect it.
Joel Coehoorn
2008-10-03 16:32:03
Having a yield keyword would be awesome. Although, I heard that they are working on an Iterator keyword.
MagicKat
2008-10-03 16:32:36
+3
A:
From some other threads:
… both will hopefully be implemented.
Konrad Rudolph
2008-10-03 16:39:10
+1
A:
a verbatim string literal character like c# (@) so we don't have to constantly escape those pesky regexes.
marduk
2008-10-03 17:00:37
erm … VB strings are already like C#'s verbatim strings. No escaping is needed (or indeed possible).
Konrad Rudolph
2008-10-03 17:04:38
So, you want a _reverse_ @ operator, so you can use constants like \n in your string.
Joel Coehoorn
2008-10-03 17:21:36
+1
A:
A few more:
- Remove the need to use _ line continuation when adding attributes to classes/methods on the line above.
- The ability to include linebreaks in string literals without having to concat to Environment.NewLine or vbCrLf (much too verbose for my tastes as is)
Joel Coehoorn
2008-10-03 17:24:53
+1
A:
I just want an old feature from VB6 that was dropped...
You used to be able to create a UI with several controls with the same name and they would become an array. I miss that.
(Yes, I know that you can do basically the same thing by dynamically creating a UI and put all of your controls in a collection, but you can't do it visually in the Drag-and-Drop UI editor, so creating these is a PIA.)
BoltBait
2008-10-21 17:10:20
+2
A:
My wishlist:
- Support for multi-statement lambdas. I want to be able to create a lambda expression that has multiple statements in it.
- Remove the limitation that all lambdas must be "Function"s so that I can write lambdas for Action() (or Action) parameters.
- Always show "References" node in Solution Explorer (instead of having to enabled the "Show All Files" option)
Jeremy Wiebe
2008-10-29 13:32:23