Panopticon Central

a blog on Visual Basic, .NET and other stuff

  Home :: Contact :: Syndication  :: Login
  491 Posts :: 19 Stories :: 3243 Comments :: 623 Trackbacks

News

The information in this weblog is provided "AS IS" with no warranties, and confers no rights.

My Book

Picture

My Recent Posts

Article Categories

Archives

Post Categories

Microsoft Blogs

Samples

Technical Blogs

VB Links

As a medium of communication, blogs have their strengths and weaknesses. The informal nature of the communication makes it incredibly easy to communicate information on an ongoing basis. The down side, of course, is that the very informality of blogs can also trip you up if you don't pay enough attention to follow up. I've certainly been guilty of that on this blog (there are still some loose ends I think haven't really been tied up), and we've been guilty of that as a team.

One thing we haven't always done a good job of is keeping people apprised of feature decisions that we've made as the VB 2008 product cycle has progressed. As a result, there has been some confusion as to what features are in and which features are out of the product. So let me start by giving a reasonably concise list of the feature set for VB 2008...

General features

  • Friend assemblies. We now pay attention to the InternalsVisibleTo attribute.
  • Relaxed delegates. As long as there is a way to map one delegate's parameters to another, you can now convert freely between delegate types. (I'd wanted to see this extended into full delegate currying, but that will have to wait for a future release.)
  • Runtime agility. The ability to compile without a VB runtime, or targeting another VB runtime.
  • Calling Object members on interfaces. Minor feature, but useful in some situations.
  • Ternary operator. A short-circuiting conditional expression like C's ?: operator.
  • Improved generic type inferencing. In VB 2005, we would not infer a type for a type parameter that had multiple inferred types (i.e. a parameter T matched two arguments typed as Integer and Long). In VB 2008, we will now pick the wider of the two types. (Actually, it's more complex than this, but you get the idea.)

LINQ

  • Local variable type inferencing.
  • Anonymous types.
  • Extension methods.
  • Nullable types.
  • Query expressions. This is the From...Where...Select... expression.
  • Object initializers. For VB 2008, we will only support initializing read-write fields of non-collection objects (more on this further down).
  • Expression trees.
  • Lambda expressions. For VB 2008, we will only support expressions in lambdas, not statements.
  • Partial methods.

XML

  • XML literals.
  • XML members.
  • XML namespaces.

I think most everything on this list has so far been discussed, with the exception of the omissions from object initializers. Our original plans, going back to PDC05, included several more features for object initializers, such as being able to write to read-only properties, as well as collection and array initializers. In the end, the schedule for VS 2008 was not sufficient to implement these features with a high degree of confidence. Which unfortunately means that they will have to wait to a release beyond VS 2008.

posted on Wednesday, June 27, 2007 1:08 PM

Feedback

# re: What's in VB 2008? What's out? 6/27/2007 4:21 PM Vincent Evans
I apologize if it was mentioned elsewhere...

Is there generics type inferring based on receiving type of the function?

Function Foo() As T
Return Bar As T
End Function

Usage:

Dim IsInferred As Boolean = Foo() ''' And i expect it to infer that T is boolean type.

I looked into it briefly - and it appears that the only way to accompoish that - is to actually pass a bogus parameter just so that it can infer what T stands for?


# re: What's in VB 2008? What's out? 6/27/2007 4:54 PM Roger Jennings
Paul,

I'm sorry to see array and collection initializers disappear.

See http://oakleafblog.blogspot.com/2007/06/vb-90-won-support-collection.html.

--rj


# re: What's in VB 2008? What's out? 6/27/2007 9:12 PM Fan Shi
I think the disappear of collection initializers is acceptable to me, but the array standalone initializer is really needed.
In current version of VB. It is easy to create an "array initializer" function like VB6 (but better with generics):

Function Array(Of T)(ByVal ParamArray elements As T()) As T()
Return elements
End Function

With this, we can easily initialize a list or array parameters.
Dim l As New List(Of String) (Array("Apple", "Banana", "Peach"))

Foo(Array(1,2,3,4,5)) 'Foo receives a Integer()

But it's only for one dimension. It would be really cool if we have a real language supported array standalone initializer for direct array literals.

# re: What's in VB 2008? What's out? 6/27/2007 11:05 PM Anthony D. Green, MCPD
Oh man, {1, 2, 3} was such a cool thing for working with arrays, especially since intellisense is stupid on making arrays of types that don't expose constructors. Anyone working with lots of reflection can feel me on this.

Good stuff otherwise. I don't mind putting things off to future versions, I just hate that future versions are like a multiyear condemnation. What with that actual CLR not changing since 2.0 I would really prefer language enhancements released out of band with the rest of the framework. I know for a language with the legacy concerns of VB this is hard but it's a lot easier to download an update to the vbc and vs than it is to move source and more importantly client workstations to a new framework library and CLR.

6-12 month agility for language level enhancements, how 'bout it?

# re: What's in VB 2008? What's out? 6/28/2007 2:55 AM Lennie
Hi,

Are there examples to demonstrate all the new features / changes?

I like to learn from examples.

Kind Regards,

Lennie De Villiers

# re: What's in VB 2008? What's out? 6/28/2007 1:08 PM Paul Vick
Vincent: This is something we've been discussing recently, but it's not in Orcas, unfortunately...

Anthony: We'd love to do things on a more aggressive cycle, but we haven't really started planning concretely beyond Orcas...

Lennie: There are a lot of good examples on http://blogs.msdn.com/vbteam/, and in MSDN as well. Check them out!

# Features do VB.NET 2008 6/30/2007 9:08 AM Israel A


# re: What's in VB 2008? What's out? 7/5/2007 8:20 PM Fan Shi
Seems I can't see some of the exciting features in this version...
Hopes next version (VB X?) have enough design time and implement full functional as early commitments.

# A True Ternary Operator for VB.net 7/22/2007 4:01 AM Samurai Programmer.com
I had a rather lengthy blog entry about a month ago where I talked about the lack of a ternary operator

# re: What's in VB 2008? What's out? 8/1/2007 6:10 AM Ameer
Does VB support colorization in VS 2008 (Such as C# in Class name)?

# re: What's in VB 2008? What's out? 8/10/2007 2:09 PM Paul Vick
Ameer, we don't support all the colorization options C# does, although this is something we're looking at for a future release...

# lowercase keywords, redux 8/10/2007 2:12 PM Panopticon Central


# VB binaries auditing tool 8/20/2007 2:01 PM Steven
I'd like to see an auditing utility to scan a machine for compiled VB6 code or anything using VB6. We are targeting March 2008 as the date we have removed all VB6 code from our machines (including Com, DLL files, etc). This is an important first step for preparing our environment for Vista and Windows Server 2008.

This is part of our larger business reliablity goal of ensuring all of our machines are using only recent (e.g., last 4 to 5 years) old code and applications.

Windows OS, Office, SQL Server, Exchange are excluded from the VB6 requirement since we run the most recent version and that they are core products from Microsoft.

# re: What's in VB 2008? What's out? 8/23/2007 11:24 AM mrcdave
I've been with vb6 for years and have only just moved to vb2008 and I like it generally. I've been able to get to grips with very quickly. I heard such bad press on VB.net didn't bother with it.
Good to see the serial port option back in, very useful.

# re: What's in VB 2008? What's out? 9/3/2007 10:48 AM ITGalary
You can see some explanation of neww features on www.itgalary.com under the forum for VB.net. This could help newbies and people who are new to this. Its with easy and undestandable examples.

# re: What's in VB 2008? What's out? 9/3/2007 10:49 AM http://www.itgalary.com/forum_posts.asp?TID=582
This is the Url for the above specified ITGalary

# re: What's in VB 2008? What's out? 9/17/2007 2:35 PM iSF1
Hey guys take some rest..... Good day!!!

# re: What's in VB 2008? What's out? 9/25/2007 10:13 AM Jon
amI missing something here? is there a way to make an array of buttons? in vb6 I could take a set of 30 buttons and assign text to them from an array instead of having to label each one individualy, but now for some reason when I try it fails miserably. my old code:
dim x as array
for x = 1 to 30
button(x).text = "Click for" + (x)
next

but this does not seem to work in the VB2008ee, am I missing something? did I do something wrong? I hate to have to type out each objects properties in length when an array makes the code so much nicer! any ideas?

# re: What's in VB 2008? What's out? 2/8/2008 2:21 PM David
I've tried each version of VB.Net that has been released and have been immensely disappointed with each. I've always gone back to VB6.

So;

- when upgrading from VB6 to VS08, does the migration tool migrate all code, or am I still going to need to rewrite massive chunks of code?

- Are VS08 Collections now properly backwards compatible to VB6 collections? Can I pass a VB6 collection from a COM dll and the VS08 application understand it?

- Can it be compiled into 'true' executable and bypass IL all together? These unsecured IL's are just silly.

- Is the Edit and Continue fixed? I know it was there for VS05 but it never worked properly. Or at the very least, it never worked as well as VB6. Has that been fixed?

- General IDE speed for all versions of VS was horrible. There were thousands of complaints about it. Is the IDE speed (when typing) at least as fast as VB6?

- Is it possible to specify what upgrade warnings are inserted into your code when you migrate? That was a heavily requested migration tool feature. Everyone hated the thousands of lines of additional comments added to our code.

- Where are our control arrays?

- Has the execution speed been improved? Executables created with VS05 never ran as fast as those created with VB6.

# re: What's in VB 2008? What's out? 3/20/2008 5:29 AM lm joshi
whethere vb.net 2003 code would work in 2008 without any change or not ?

Post Feedback

Title:
Name:
Url:
Comments: