SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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.
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
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.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
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
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
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
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 

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