iron* - an introduction to getting dynamic on .net

Post on 13-May-2015

1.451 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

In recent years dynamically typed languages have received more and more attention on the .NET platform. Initially, an implementation of Python showed up. Later, the Dynamic Language Runtime (DLR) appeared which made it much easier to implement dynamically typed languages on .NET. This session explores how dynamically typed languages fit in the ecosystem of .NET. We’ll see why dynamic languages are interesting and contrast them to their static brethren (C#, Java). Then we will touch on how IronPython and IronRuby are implemented on .NET via the Dynamic Language Runtime (DLR). Finally, we’ll look at some code examples of how you can utilize these languages on .NET today.

TRANSCRIPT

Iron* - An Introduction to Getting Dynamic on

.NET //kristiankristensen.dk

twitter.com/kkristensen

mail@kristiankristensen.dk

Question

Dynamic Languages

Dynamic Language Runtime

Demo!

45 min 15 min

Agenda

Why Dynamic Languages

Fashion

Fame

Weight Loss

Interest

Fortune

What makes a language “dynamic”?

http://www.flickr.com/photos/35064820@N00/3950391591/

http://www.flickr.com/photos/janineberben/3219556705/

Why Dynamic Languages

Simplicity

Expressive Perspective

The traditional view of the world

Dynamic Languages

Simple and succinct

Implicitly typed

Meta-programming

No compilation

Static Languages

Robust

Performance

Intelligent tools

Better scaling

Dynamic Language Runtime

Dynamic Languages on .NET

IronPython IronRuby

C# VB.NET

Common Language Runtime

Iron?

Multiple Language Dynamic Dispatch

Object Binder

Python Binder

Ruby Binder

COM Binder

Dynamic Language Runtime

GetMember Name=“Foo”, IgnoreCase=false

IronPython x.Foo

IronRuby x.Foo

C# x.Foo

VB.NET x.Foo

Common Language = CLR + DLR

Today’s view of the world

Dynamic Languages

Simple and succinct

Implicitly typed

Meta-programming

No compilation

Static Languages

Robust

Performance

Intelligent tools

Better scaling

Iron languages are first class .NET citizens

IronWhat? • True language implementation

– True to the language

– True to the community

– True to the experience

– Excellent performance

• Great integration with .NET – Easy to use .NET libraries

– Easy to use other .NET languages

– Easy to use in .NET hosts

– Easy to use with .NET tools

• Implementation Running On .NET

Languages on DLR

• Pictures

Why Iron* Languages?

Easy to extend

Easy to embed

.NET Interop

” Talk is cheap. Show me the code.” - Linus Torvalds

http://en.wikiquote.org/wiki/Linus_Torvalds

Ruby Test Framework

[TestClass] public class StackTest { [TestMethod] public void NewStackHasZeroElements() { var s = new Stack<string>(); Assert.AreEqual<int>(0, s.Count); } [TestMethod] public void StackPeekTopElement() { var s = new Stack<string>(); s.Push("bob"); Assert.AreEqual<int>(1, s.Count); Assert.AreEqual<string>("bob", s.Peek()); } [TestMethod] public void StackPopTopElement() { var s = new Stack<string>(); s.Push("bob"); Assert.AreEqual<string>("bob", s.Pop()); Assert.AreEqual<int>(0, s.Count); } }

IronPython in Visual Studio

http://ironpython.net/tools

Easy to embed aka BadPaint

The road ahead (picture)

http://ironpython.net

http://ironruby.net

http://dlr.codeplex.com

The end.

//kristiankristensen.dk //twitter.com/kkristensen

mail@kristiankristensen.dk

top related