(Yay!! Finally, some VB!!)
Where is Visual Basic headed?
Let’s look at where it’s been and what role it plays at Microsoft. It’s been the primary way that the platform has been made easy to use for all programmers. Seventeen years ago, Visual Basic (VB1-VB3) played a key role in making Windows the premier platform. From VB4 to VB6, the focua was on making COM programming possible for normal, mortal human beings.
VB7 was the first .NET release, helping establish the CLR as the premier runtime. VB8 and VB9 built on this legacy.
Looking at VB10 and beyond, the goal continues to be to make Microsoft initiatives easy to use, accessible and simple.
VB10 will be co-evolved with C#. There’s a history of going back and forth between co-operation and rivalry. On the co-operation side, there’s been an incredible amount of knowledge and technology transfer between the languages. First-class properties, events and enumerations started in VB and were merged into C#. Similarly, optional parameters, dynamic bindings and named arguments a re being brought into C#. VB8 introduced generics, unsigned types and overloaded operators – all of which came from C#. LINQ was a co-operative effort.
There is, however, a somewhat checkered past with some rivalry. Nullable types, automatic properties, multi-line lambdas, and xml literals are only a few points of contention.
Microsoft has made a promise to ensure that both languages have the same fundamental capabilities.
Language features that will be in VB10.0:
- Multi-line lambdas – both subs and functions
- Task Parallel Library/PLINQ
- Interop with dynamic languages (DLR interop): allows the instantiation of DLR runtimes (e.g. Python), and make direct calls into those DLL’s methods
- Type inference – including jagged arrays
- “From” keyword for initialization (e.g. Dim scores As New List(Of Integer) From {53, 99, 40}); also for Dictionary
- Automatic properties (e.g. Public Property Score As Integer = –1)
- The _ line continuation character is dead!!! Clearly, they need to be reskilled as semi-colons. There are some cases where ambiguity still requires underscores.
- Generic co- and contra-variance: solves the problem with casting List(Of B) to List(Of A) where B inherits from A. You can use an IEnumerable(Of B) in place. There’s a useful error message to guide you in this one.
- Improved support for Office Interop. “No-PIA” allows you to embed the interop assembly directly in your executable – embedding only those types that you’re referencing in your application. This greatly simplifies your deployment, while imposing only a small additional payload in your .exe.
SWEET!!!
Futures (multi-version “roadmap”)
- Dynamic languages: simplifies code, but also provides looser coupling; ironically, this will more tightly couple the C# and VB runtimes
- Concurrent: massively concurrent and parallel applications provide better distribution of services and work, using resources more effectively
- Declarative: a more natural way of expressing the task at hand… but there’s a challenge around how different syntaxes mesh
- Opening up the box: the compiler is currently a big black box; if the semantics, code generator and compiler are exposed, we have the ability to cooperate in the compilation process and inject our own control
Blogs to watch
http://msdn.com/vbasic
http://blogs.msdn.com/vbteam
http://blogs.msdn.com/lucian
http://www.panopticoncentral.net
It was great to meet Lucian in person, finally. With Paul Vick moving on to the Oslo team, it’s good to know the language is in capable, enthusiastic hands. It’s also reassuring to know that Paul is becoming the VB Architect Emeritus, so he’ll still be around for a while yet. Good luck, Paul, and welcome aboard Lucian!