karen liu microsoft dev 339download.microsoft.com/documents/hk/technet/techdays2009/...source...
TRANSCRIPT
![Page 1: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/1.jpg)
![Page 2: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/2.jpg)
Karen LiuIDE Lead Program ManagerMicrosoftDev 339
![Page 3: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/3.jpg)
The Evolution of Visual Basic
Visual Basic
1.0-3.0Visual Basic
4.0-6.0
Visual Basic
7.0-9.0
Visual Basic 10.0
Visual Basic 11.0+
![Page 4: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/4.jpg)
VB's Fraternal Twin: C#Co-Evolution
![Page 5: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/5.jpg)
Trends
Declarative
ConcurrentDynamic
![Page 6: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/6.jpg)
Declarative Programming
What
How
Imperative Declarative
![Page 7: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/7.jpg)
Dynamic vs. Static
DynamicLanguages
Simple and succinct
Implicitly typed
Meta-programming
No compilation
StaticLanguages
Robust
Performant
Intelligent tools
Better scaling
![Page 8: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/8.jpg)
Concurrency
![Page 9: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/9.jpg)
VB 10 Language FeaturesKaren LiuVB/C# IDE Lead Program ManagerMicrosoft
![Page 10: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/10.jpg)
What you saw
Implicit line continuation
Automatically implemented properties
Collection initializers
Array literals
Statement lambdas
![Page 11: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/11.jpg)
Implicit Line Continuation
<Attribute()>Function Go(
ByVal x As Integer,ByVal y As Integer
)
Dim query =From n In {
123,456,}
Order By nSelect n +
x
![Page 12: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/12.jpg)
Auto-implemented Properties
Property FirstName As String
Property LastName As String
Initializers:
Property ID As Integer = -1
Property Suppliers As New List(Of Supplier)
![Page 13: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/13.jpg)
Collection Initializers
Dim x As New List(Of Integer) From {1, 2, 3}
Dim list As New Dictionary(Of Integer, String) From
{{1, “Bart”},
{2, “Lisa”},
{3, “Homer”}}
Array Literals:
Dim a = {1, 2, 3} 'infers Integer()
Dim b = {1, 2, 3.5} 'infers Double()
![Page 14: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/14.jpg)
Statement Lambdas
Dim items = {1, 2, 3, 4, 5}
Array.ForEach(items, Sub(n) Console.WriteLine(n))
Array.ForEach(items, Sub(n)
If n Mod 2 = 0 Then Console.WriteLine(n)End Sub)
'Count the number of even items in the arrayDim total = items.Count(Function(n)
Return (n Mod 2 = 0)End Function)
![Page 15: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/15.jpg)
PythonBinder
RubyBinder
COMBinder
JavaScriptBinder
ObjectBinder
.NET Dynamic Programming
Dynamic Language Runtime
Expression Trees Dynamic Dispatch Call Site Caching
IronPython IronRuby C# VB.NET Others…
![Page 16: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/16.jpg)
VB 10 –Dynamic InteropKaren LiuIDE Lead Program ManagerMicrosoft
![Page 17: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/17.jpg)
Interop with Dynamic Languages
'Load a file from Python into memoryDim random As Object = python.UseFile("random.py")
Dim items = {1, 2, 3, 4, 5, 6, 7}
'Dynamic (late-bound) call to Python functionrandom.shuffle(items)
'Print out the shuffled arrayArray.ForEach(items, Sub(n) Console.WriteLine(n))
![Page 18: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/18.jpg)
Interop Type Embedding ("No Pia")
• Use PIAs at design-time, not runtime
• No need to deploy PIA to user’s machine
• Compiler embeds the specific members of the specific types used into your assembly
![Page 19: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/19.jpg)
Compiler as a Service
CompilerCompilerSource codeSource code
SourceFile
Source codeSource code
.NET Assembly
Class
Field
public Foo
private
string
X
Meta-programming Read-Eval-Print Loop
LanguageObject Model
DSL Embedding
![Page 20: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/20.jpg)
Compiler as a ServiceKaren LiuVB/C# IDE Lead Program ManagerMicrosoft
![Page 21: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/21.jpg)
Summary
Declarative
ConcurrentDynamic
![Page 22: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/22.jpg)
![Page 23: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/23.jpg)
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
![Page 24: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/24.jpg)
Related Content
Dev352 (R) – Increase Your Productivity with the Visual Studio 2010 IDE
DTL339 (R) – Future Directions for Microsoft Visual Basic
Dev423 – How LINQ Works: A Deep Dive into the Microsoft Visual Basic and C# Implementations
![Page 25: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/25.jpg)
Track Resources
VB Team Blog – http://blogs.msdn.com/vbteamBeth Massi’s Blog - http://blogs.msdn.com/bethmassi
MSDN VBasic Site – http://msdn.com/vbasic
VB 10 Whitepaper -http://code.msdn.microsoft.com/vbfuture/Release/ProjectReleases.aspx?ReleaseId=1699
VB Developer Center - http://msdn.com/vbasic
Questions? Comments? Requests? Email me at [email protected]
![Page 26: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/26.jpg)
Complete an
evaluation on
CommNet and
enter to win!
![Page 27: Karen Liu Microsoft Dev 339download.microsoft.com/documents/hk/technet/techdays2009/...Source code.NET Assembly Class Field public Foo private string X Meta-programming Read-Eval-Print](https://reader033.vdocuments.us/reader033/viewer/2022053110/607f28d4a0841e37f16ca4bf/html5/thumbnails/27.jpg)
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.