A group blog from members of the VB team
The Beta 2 version of the Visual Basic Language specification has been released onto the download center. This language specification corresponds to the version of Visual Basic that will ship in Visual Studio 2008. The spec covers the following major new features:
• Friend assemblies (InternalsVisibleTo)• Relaxed delegates• Local type inferencing• Anonymous types• Extension methods• Nullable types• Ternary operator• Query expressions• Object initializers• Expression trees• Lambda expressions• Generic type inferencing• Partial methods
The following features are not covered but should be shortly:
• XML Members• XML Literals• XML Namespaces
Although it will be updated again for the final release, the VB team wanted to get this out to the community now.
PingBack from http://www.artofbam.com/wordpress/?p=10648
Finally we will have the ternary operator in Visual Basic
The The Visual Basic Team tells us " Visual Basic 9.0 Language Specification Released ". The Beta 2 version
Visual Basic 9 Beta 2 语言规范 已经被在微软的下载中心发布了。这个语言规范和将与 Visual Studio 2008 一同到来的 Visual Basic 版本保持一致。尽管它将在最终的发布中被再次更改，但是 VB 团队仍然希望现在就将它提供给社区。
So will there not be automatic properties in VB9?
Why oh why?
The page numbers are way off and I don't see anything about ternary operators in there.
What's up with that?! Are you teasing me?
@Josh - The "ternary" operator is in section 11.22 Conditional Expressions.
Hello, thanks for this information. I was hoping for anonymous methods (or is it "anonymous delegates" ?) like C# has had for years now.
Not bringing this to VB means it remains awkward
to do multi-threading in VB, IMHO.
Or am I missing something ?
Yes, the absence of anonymous methods (not delegates) in VB does make multithreading more cumbersome than C# depending on how you lay out your application to use threading. If you structure your application to make use of the asynchronous event model (e.g. the BackgroundWorker component) with Service/Command/Method objects this is less of a hassle. It all depends on how robust your domain layer is and the degree to which your UI must deal with things outside of pure presentation/interaction.
To be honest, even if VB had anonymous methods I would still prefer this design. Anonymous delegates are more useful for mappings and Extension methods on collection types and such.
As an aside I find the anonymous method syntax less useful than expected in UI/threading scenarios due to the fact that, as I mentioned, C# supports anonymous METHODS, not anonymous delegates. Because the signature of Control.Invoke takes a System.Delegate no delegate type inference can be made and a concrete delegate type must still be specified. This takes away from the brevity and value of the capability. I suppose with lambdas and closures this could be minimized though once again I still prefer a smart domain layer to a busy UI…
Thanks Travis!! I guess I shoulda expected the page numbers to be inaccurate, considering this is still beta.
Just checked it out and the ternary operators could not have been designed any better. Twas exactly what I had anticipated.
米国MicrosoftでVB作ってるチームが、The Visual Basic Teamって社員b...
Last week I got the chance to visit the Toronto .NET User Group and give a talk on all the great new
connect database with visual basic 2008 version 9.0