1 / 23

Dynamic Languages & The .Net Framework

Dynamic Languages & The .Net Framework. Shay Friedman ActionBase http://blogs.microsoft.co.il/blogs/shayf. בָבָא כֶל שַיו אָרְבֵה. http://www.flickr.com/photos/ko_an/1472480778/. hru ? gr8, i noe u <3 me, i luv u 2. SMS. http://www.flickr.com/photos/qilin/527130002/.

iago
Download Presentation

Dynamic Languages & The .Net Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Languages & The .Net Framework Shay Friedman ActionBase http://blogs.microsoft.co.il/blogs/shayf

  2. בָבָא כֶל שַיו אָרְבֵה http://www.flickr.com/photos/ko_an/1472480778/

  3. hru? gr8, inoe u <3 me, iluv u 2 SMS http://www.flickr.com/photos/qilin/527130002/

  4. תמסור לקמב"ץ שיש אבט"ש בלת"מ חבל"ז בבח"א! ושישכח מרבעו"ש! http://www.flickr.com/photos/kikasso/1399327118/

  5. Dynamic Languages & The .Net Framework Shay Friedman ActionBase http://blogs.microsoft.co.il/blogs/shayf

  6. Agenda • The Dynamic Languages World • The Dynamic Language Runtime • Dynamic Languages on Everyday Tasks • The Future: Dynamic Capabilities in .Net 4.0 • Q & A • Summary

  7. The Dynamic Languages World

  8. The Dynamic Languages World

  9. demo Dynamic Languages Introduction

  10. Dynamic Language Runtime IronRuby IronPhyton C# VB.Net Others… Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching Object Binder JavaScript Binder Python Binder Ruby Binder COM Binder

  11. Dynamic Language Runtime – LOLCODE Code start HAI CAN HAS STDIO? I HAS A FISH ITZ "Yummy" VISIBLE FISH VISIBLE "HAI WORLD!" IM IN YR LOOP VISIBLE “LOOP!” KTHX KTHXBYE Equivalent to: FISH = “Yummy”; Equivalent to: Console.WriteLine(“HAI WORLD!”); Loop start Loop end Code end

  12. demo Dynamic Languages with .Net

  13. Dynamic Languages on Everyday Tasks

  14. demo Dynamic Languages on Everyday Tasks

  15. Dynamic Capabilities in C# 4.0 נוּדְנִיק

  16. Dynamic Capabilities in C# 4.0 Calculator calc = GetCalculator(); int sum = calc.Add(10, 20); object calc = GetCalculator(); TypecalcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, newobject[] { 10, 20 }); int sum = Convert.ToInt32(res); ScriptObject calc = GetCalculator(); object res = calc.Invoke("Add", 10, 20); int sum = Convert.ToInt32(res); Statically typed to be dynamic dynamic calc = GetCalculator(); int sum = calc.Add(10, 20); Dynamic conversion Dynamic method invocation

  17. Dynamic Capabilities in C# 4.0 publicabstractclassDynamicObject : IDynamicObject { publicvirtualobjectGetMember(GetMemberBinder info); publicvirtualobjectSetMember(SetMemberBinder info, object value); publicvirtualobjectDeleteMember(DeleteMemberBinder info); publicvirtualobjectUnaryOperation(UnaryOperationBinder info); publicvirtualobjectBinaryOperation(BinaryOperationBinder info, objectarg); publicvirtualobject Convert(ConvertBinder info); publicvirtualobject Invoke(InvokeBinder info, object[] args); publicvirtualobjectInvokeMember(InvokeMemberBinder info, object[] args); publicvirtualobjectCreateInstance(CreateInstanceBinder info, object[] args); publicvirtualobjectGetIndex(GetIndexBinder info, object[] indices); publicvirtualobjectSetIndex(SetIndexBinder info, object[] indices, object value); publicvirtualobjectDeleteIndex(DeleteIndexBinder info, object[] indices); publicMetaObjectIDynamicObject.GetMetaObject(); }

  18. Demo Dynamic Capabilities in C# 4.0

  19. Q & A

  20. Summary • The Dynamic Languages World • The Dynamic Language Runtime • Dynamic Languages on Everyday Tasks • The Future: Dynamic Capabilities in .Net 4.0 • Try it yourself: http://blogs.microsoft.co.il/blogs/shayf

  21. Please Fill your Evaluation!

  22. © 2008 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.

More Related