SlideShare une entreprise Scribd logo
1  sur  22
Dynamic programming languages
    In the broadest sense of the word


Dynamic programming language is a term used
broadly in computer science to describe a class of high-
level programming languages that execute at runtime
many common behaviors that other languages might
perform during compilation, if at all. These behaviors
could include extension of the program, by adding new
code, by extending objects and definitions, or by
modifying the type system, all during program execution.


Source: Wikipedia
Briefly
 Changing types at runtime
 No types at all
 Generate code at runtime
 Simplified deployment
Where Dynamic Languages fit

 Rapid prototype development
 Better string processing capabilities
Dynamic VS Static
        Dynamic                  Static
       Languages               Languages

  Simple & Easy to Learn       Type safety


       Late bound          Runtime Performance


    Highly Expressive      Compile-time checking


     No compilation          Intelligent tools
Dynamic Languages on .NET


Iron Python      Iron Ruby        C#     Others…


              Dynamic Language Runtime



                       .NET CLR
Is C# dynamic language..?

 Yes..optionally..
 New dynamic keyword in C# 4.0
Dynamic VS Object
   dynamic dyn = 1;
   object obj = 1;

   //NOT MUCH DIFFERENCE
   System.Console.WriteLine(dyn.GetType());
   System.Console.WriteLine(obj.GetType());


   dyn = dyn + 3;
   obj = obj + 3; // THROWS ERROR
   //obj = (int)obj + 3;


More Readable Code
The Dynamic Type in C#
         Calculator calc = GetCalculator();
         int sum = calc.Add(10, 20);

object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember("Add",
    BindingFlags.InvokeMethod, null,
    new object[] { 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        dynamic calc = GetCalculator();
    be dynamic              int sum = calc.Add(10, 20);


                        Dynamic                 Dynamic method
                       conversion                 invocation
DLR Website

  http://dlr.codeplex.com/
Microsoft Vision
 Implemented as Iron Languages
     Iron Python, Iron Ruby
   All languages run on .NET runtime
   Easy to use .NET libraries
   Easy to use other .NET languages
   Easy to use in .NET hosts
   Easy to use with .NET tools
Current Status
 DLR 1.0
 Iron Python 2.7.2.1
 IronRuby 1.1.3
IronPython
 IronPython Website
 http://ironpython.codeplex.com/
IronPython vs CPython
 IronPython
   Written in C#
   Works with .NET VM
   Produces IL code
   Assemblies, Modules
 CPython
   Written in C
   Works Python VM
   Produces Python Byte Code
   Modules
Tools to Develop IronPython

 Python Tools for Visual Studio
  http://pytools.codeplex.com/
Iron Python Shell
Exploring Iron Python
Demo
   Using .NET Class Libraries
    (HelloWorld example)
   Using C# DLL in Iron Python
    (Extending Iron python with C#)
   Embedding Iron Python in C#
   Windows Forms
ASP.NET Iron Python
 http://aspnet.codeplex.com/wikipage?title=Dynam
  ic%20Language%20Support

 Demo
What about Linux
  Iron Python can run on Linux
  Mono
How to Contribute
  Both Iron Python and DLR are open source
   projects
  Iron Python Project will accept source code
   and bugs
  DLR is just open source
Dynamic Languages in Java
 Java 223 Specification
 Jython
Real world example

 http://Ironserver.codeplex.com

Contenu connexe

Tendances

Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
Tim Burks
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
AdaCore
 

Tendances (17)

Create Your Own Language
Create Your Own LanguageCreate Your Own Language
Create Your Own Language
 
Introduction to Khronos SYCL
Introduction to Khronos SYCLIntroduction to Khronos SYCL
Introduction to Khronos SYCL
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
 
LIL Presentation
LIL PresentationLIL Presentation
LIL Presentation
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Whats New In C Sharp 4 And Vb 10
Whats New In C Sharp 4 And Vb 10Whats New In C Sharp 4 And Vb 10
Whats New In C Sharp 4 And Vb 10
 
1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)1..Net Framework Architecture-(c#)
1..Net Framework Architecture-(c#)
 
Kotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan ArdianKotlin fundamentals - By: Ipan Ardian
Kotlin fundamentals - By: Ipan Ardian
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
Kotlin
KotlinKotlin
Kotlin
 
Post-graduate course: Object technology: Implementation of object-oriented pr...
Post-graduate course: Object technology: Implementation of object-oriented pr...Post-graduate course: Object technology: Implementation of object-oriented pr...
Post-graduate course: Object technology: Implementation of object-oriented pr...
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
 
Android with kotlin course
Android with kotlin courseAndroid with kotlin course
Android with kotlin course
 
LLDB + Python for iOS developers
LLDB + Python for iOS developersLLDB + Python for iOS developers
LLDB + Python for iOS developers
 

En vedette

.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
Doncho Minkov
 

En vedette (14)

OOPS – General Understanding in .NET
OOPS – General Understanding in .NETOOPS – General Understanding in .NET
OOPS – General Understanding in .NET
 
Clr ppt
Clr pptClr ppt
Clr ppt
 
DotNet Framework
DotNet FrameworkDotNet Framework
DotNet Framework
 
.net CLR
.net CLR.net CLR
.net CLR
 
Fundamentals of oops in .Net
Fundamentals of oops in .NetFundamentals of oops in .Net
Fundamentals of oops in .Net
 
Introduction to .NET Programming
Introduction to .NET ProgrammingIntroduction to .NET Programming
Introduction to .NET Programming
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Oops concept on c#
Oops concept on c#Oops concept on c#
Oops concept on c#
 
Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
Dotnet basics
Dotnet basicsDotnet basics
Dotnet basics
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
Introduction of Cloud computing
Introduction of Cloud computingIntroduction of Cloud computing
Introduction of Cloud computing
 

Similaire à Dynamic languages for .NET CLR

Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Introduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamicIntroduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamic
Gieno Miao
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
Wei Sun
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
Rishi Kothari
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
Rajnish Kalla
 

Similaire à Dynamic languages for .NET CLR (20)

PDC Video on C# 4.0 Futures
PDC Video on C# 4.0 FuturesPDC Video on C# 4.0 Futures
PDC Video on C# 4.0 Futures
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
IronPython and Dynamic Languages on .NET by Mahesh Prakriya
 IronPython and Dynamic Languages on .NET by Mahesh Prakriya IronPython and Dynamic Languages on .NET by Mahesh Prakriya
IronPython and Dynamic Languages on .NET by Mahesh Prakriya
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011Iron Languages - NYC CodeCamp 2/19/2011
Iron Languages - NYC CodeCamp 2/19/2011
 
Introduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamicIntroduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamic
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
Iron python
Iron pythonIron python
Iron python
 
Advance Android Application Development
Advance Android Application DevelopmentAdvance Android Application Development
Advance Android Application Development
 
Next .NET and C#
Next .NET and C#Next .NET and C#
Next .NET and C#
 
The Future of C# and Visual Basic
The Future of C# and Visual BasicThe Future of C# and Visual Basic
The Future of C# and Visual Basic
 
E sampark with c#.net
E sampark with c#.netE sampark with c#.net
E sampark with c#.net
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNextMicrosoft 2014 Dev Plataform -  Roslyn -& ASP.NET vNext
Microsoft 2014 Dev Plataform - Roslyn -& ASP.NET vNext
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
.Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1).Net Overview -- Training (Lesson 1)
.Net Overview -- Training (Lesson 1)
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Tml for Objective C
Tml for Objective CTml for Objective C
Tml for Objective C
 
Localization (l10n) - The Process
Localization (l10n) - The ProcessLocalization (l10n) - The Process
Localization (l10n) - The Process
 

Dernier

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Dynamic languages for .NET CLR

  • 1.
  • 2. Dynamic programming languages  In the broadest sense of the word Dynamic programming language is a term used broadly in computer science to describe a class of high- level programming languages that execute at runtime many common behaviors that other languages might perform during compilation, if at all. These behaviors could include extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system, all during program execution. Source: Wikipedia
  • 3. Briefly  Changing types at runtime  No types at all  Generate code at runtime  Simplified deployment
  • 4. Where Dynamic Languages fit  Rapid prototype development  Better string processing capabilities
  • 5. Dynamic VS Static Dynamic Static Languages Languages Simple & Easy to Learn Type safety Late bound Runtime Performance Highly Expressive Compile-time checking No compilation Intelligent tools
  • 6. Dynamic Languages on .NET Iron Python Iron Ruby C# Others… Dynamic Language Runtime .NET CLR
  • 7. Is C# dynamic language..?  Yes..optionally..  New dynamic keyword in C# 4.0
  • 8. Dynamic VS Object dynamic dyn = 1; object obj = 1; //NOT MUCH DIFFERENCE System.Console.WriteLine(dyn.GetType()); System.Console.WriteLine(obj.GetType()); dyn = dyn + 3; obj = obj + 3; // THROWS ERROR //obj = (int)obj + 3; More Readable Code
  • 9. The Dynamic Type in C# Calculator calc = GetCalculator(); int sum = calc.Add(10, 20); object calc = GetCalculator(); Type calcType = calc.GetType(); object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 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 dynamic calc = GetCalculator(); be dynamic int sum = calc.Add(10, 20); Dynamic Dynamic method conversion invocation
  • 10. DLR Website http://dlr.codeplex.com/
  • 11. Microsoft Vision  Implemented as Iron Languages  Iron Python, Iron Ruby  All languages run on .NET runtime  Easy to use .NET libraries  Easy to use other .NET languages  Easy to use in .NET hosts  Easy to use with .NET tools
  • 12. Current Status  DLR 1.0  Iron Python 2.7.2.1  IronRuby 1.1.3
  • 13. IronPython  IronPython Website  http://ironpython.codeplex.com/
  • 14. IronPython vs CPython  IronPython  Written in C#  Works with .NET VM  Produces IL code  Assemblies, Modules  CPython  Written in C  Works Python VM  Produces Python Byte Code  Modules
  • 15. Tools to Develop IronPython  Python Tools for Visual Studio http://pytools.codeplex.com/
  • 17. Exploring Iron Python Demo  Using .NET Class Libraries (HelloWorld example)  Using C# DLL in Iron Python (Extending Iron python with C#)  Embedding Iron Python in C#  Windows Forms
  • 18. ASP.NET Iron Python  http://aspnet.codeplex.com/wikipage?title=Dynam ic%20Language%20Support  Demo
  • 19. What about Linux  Iron Python can run on Linux  Mono
  • 20. How to Contribute  Both Iron Python and DLR are open source projects  Iron Python Project will accept source code and bugs  DLR is just open source
  • 21. Dynamic Languages in Java  Java 223 Specification  Jython
  • 22. Real world example http://Ironserver.codeplex.com