Compartilhar via


XML, Dynamic Languages, and VB

Thursday at PDC saw lots of details being put out about another big project our team has been working on -- the deep support for XML in Visual Basic 9.  This is actually part of an even larger effort that our team member Erik Meijer has been involved in, to support  fully dynamic languages such as Python in the .NET Common Language Runtime. 

On the VB9 front, the big news is that two major features beyond and on top of LINQ will be supported in VB9:

"XML Literals" is  the ability to embed XML syntax directly into VB code. For example,

Dim ele as XElement = <Customer/>

Is translated by the compiler to

Dim ele as XElement =  new XElement("Customer")

The syntax further allows "expression holes" much like those in ASP.NET where computed values can be inserted.

"Late Bound XML" is the ability to reference XML elements and attributes directly in VB syntax rather than having to call navigation functions.  For example

Dim books as IEnumerable(Of XElement) = bib.book

Is translated by the compiler to

Dim books as IEnumerable(Of XElement) = bib.Elements("book")

 We believe that these features will make XML even more accessible to Visual Basic's core audience. Erik Meijer, a hard core languages geek who helped devise the Haskell functional programming language and the experimental XML processing languages X#, Xen, and C-Omega, now touts VB9 as his favorite.  He gave a talk yesterday outlining the spectrum from statically typed languages such as C# and Java at one end, and fully dynamic languages such as Python at the other, but with VB right in the middle.  His mantra is "Static typing where possible, dynamic typing where necessary."  This fits in with what I quoted Anders saying about C# 3.0 having the ease of use of script while fully supporting strong typing, but VB takes it even further.

The proof that .NET is a platform for all languages, not just static ones, might be seein in one bit of information that came out in a presentation on Iron Python (the Python implementation on top of .NET) yesterday.  Iron Python is actually faster on the Python benchmarks than the core Python written in C. 

I'll post links to the supporting material later in a PDC wrapup post, but for now the message I want to get across is that our group is involved in some fascinating innovations to make XML easier for mainstream developers to work with, and we embrace both the static and dynamic languages. 

Mike Champion

Comments

  • Anonymous
    September 17, 2005
    XML was everywhere at PDC, even if you didn't notice it. Bill Gates said in his keynote something like&amp;nbsp;“In...

  • Anonymous
    May 10, 2006
    Welcome to the Microsoft Data blog. I’m Samuel Druker and I lead the group that’s responsible for building...

  • Anonymous
    June 21, 2006
    Welcome to the Microsoft Data blog. I’m Samuel Druker and I lead a group that’s responsible for building...

  • Anonymous
    May 17, 2007
    I just finished my last session here at DevTeach called "The Future of Visual Basic" and it was another

  • Anonymous
    October 13, 2007
    PingBack from http://www.gallopingdev.com/blog/2007/10/at-code-camp-8/

  • Anonymous
    June 16, 2009
    PingBack from http://fixmycrediteasily.info/story.php?id=18122