Microsoft Visual Studio upgrade holds dynamic language capabilities

Visual Basic, C# to be more interoperable with platforms like Python, JScript, and others

Microsoft is busy factoring in the growing use of dynamic languages in its planned upgrade to the Visual Studio software development platform.

The upcoming Visual Studio 2010 release boosts interoperability between the Visual Basic and C# languages and dynamic languages, Microsoft's S. Somasegar, senior vice president of the Microsoft developer division, said in a blog entry Wednesday evening. C# 4.0 and Visual Basic 10.0 will be available in Visual Studio 2010 and are currently offered in the beta release of the development platform.

[ Test Center First Look: Visual Studio 2010 beta shows some leg. ]

"C# 4.0's major themes are interoperability with dynamic programming paradigms and improved Office programmability. Dynamic lookup, a new feature in C# 4.0, allows you to use and manipulate an object from IronPython, IronRuby, JScript, the HTML DOM, or a standard .Net library in the same way, no matter where it came from," Somasegar said.

A dynamic keyword capability in C# 4.0 allows a type to be resolved dynamically at runtime rather than in a static fashion compiled at runtime. "This allows dynamic languages to expose their objects to C# in a way that feels natural to a C# programmer," Somasegar said.

For Visual Basic, interoperability with dynamic languages is made simpler through such techniques as use of code snippets to call a Python library, Somasegar said.

The successor to Visual Studio 2008, Visual Studio also is set to feature other improvements for developers using the two Microsoft programming languages. Although Microsoft has not yet said when Visual Studio 2010 will be released, previous estimates have placed its release possibly as early as later this year.

"Language enhancements such as named and optional parameters and improved support for COM clients give C# developers who are working with Office APIs the same great experience that Visual Basic developers have enjoyed," he said.

"The Visual Basic team focused on adding productivity features to the language so developers can get more done in fewer lines of code," Somasegar said. "The most common customer request for Visual Basic is to remove the underscore ("_") character when breaking a code statement across multiple lines in most cases. Visual Basic 10 introduces implicit line continuation, which removes the need for the underscore character in most cases."

Also featured for Visual Basic are auto-implemented properties, in which lines of boilerplate property implementation code can be replaced with one-line declarations. Collection initializers and array literals also are simpler. "Collections can now be initialized when they're declared, and the type of array literals is inferred by the compiler," Somasegar said.

Support for lambdas has been improved for Visual Basic. With Visual Basic 10, lambdas can contain expressions that do not return a value. Capabilities like multiple lambdas are supported, with the compiler inferring parameter and return types when possible, just like in regular lambdas.

Copyright © 2009 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!