Trends in Programming Languages Bart J.F. De Smet blogs.bartdesmet.net/bart

Slides:



Advertisements
Similar presentations
Ofir Aspis 1/2010 VS 2010 Targets High Level - IDE New Features VS 2010 As Editor and Platform Demo Editor features Extending.
Advertisements

James Kolpack, InRAD LLC popcyclical.com. CodeStock is proudly partnered with: Send instant feedback on this session via Twitter: Send a direct message.
Pavel Yosifovich Hi-Tech College
Lucian Wischik VB+C# language PM Microsoft Corporation The Future of VB and C#
Build-Deploy-Test with Visual Studio Lab Management 2010 Pieter Gheysens Visual Studio ALM MVP – Sparkles User Group Lead VISUG (
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
HTML5 That’s what you need to know today Ingo Rammer, thinktecture
What’s new in ASP.NET 3.5? Mike Ormond Developer & Platform Group Microsoft Ltd
& Silverlight, Windows Phone 7, Windows Azure, jQuery, OData and RIA Services. Shaken, not stirred. Kevin
F# Shiva Srivastava David He Peter Bingel. Overview F# (pronounced "F sharp") is a functional and object oriented programming language for the Microsoft.NET.
Switching on the cloud for Silverlight MSDN Live Meeting Gill Cleeren Microsoft Regional Director – Silverlight MVP Ordina Belgium.
Gurinder CTO. Lisa Feigenbaum Microsoft Program Manager Visual Studio Languages
Managed Code Generics Language Integrated Query Dynamic + Language Parity C# VB 11.0 Windows Runtime + Asynchrony C# VB 7.0 C# VB.
demo video demo Dynamic Languages Simple and succinctImplicitly typedMeta-programmingNo compilation Static Languages RobustPerformantIntelligent.
Louis de Klerk Consultant Inobits Consulting DTL308.
Languages and tools. BY SA machine code.
Parallel Programming in.NET 4.0 Tasks and Threading Ingo Rammer, thinktecture
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
A Bridge to Your First Computer Science Course Prof. H.E. Dunsmore Concurrent Programming Threads Synchronization.
Functional Programing Referencing material from Programming Language Pragmatics – Third Edition – by Michael L. Scott Andy Balaam (Youtube.com/user/ajbalaam)
Total Workstation Lockdown: Your Action Plan Jeremy Moskowitz, Group Policy MVP Chief Propeller-Head: GPanswers.com Founder: PolicyPak Software (policypak.com)
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Chapter 1 - Introduction
Putting it all together: LINQ as an Example. The Problem: SQL in Code Programs often connect to database servers. Database servers only “speak” SQL. Programs.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Parallel Programming in.NET 4.0 Tasks and Threading Ingo Rammer, thinktecture
LINQ, Take Two Realizing the LINQ to Everything Dream Bart J.F. De Smet blogs.bartdesmet.net/bart
About Me Microsoft MVP Intel Blogger TechEd Israel, TechEd Europe Expert C++ Book
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
CS5222 Advanced Computer Architecture Part 3: VLIW Architecture
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
Programming Languages
Windows Azure for IT Pros Kurt CLAEYS (TSP Windows Azure, Microsoft EMEA)
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
Inside LINQ to Objects How LINQ to Objects work Inside LINQ1.
Ronnie Saurenmann Principal Architect Microsoft Switzerland Silverlight 5 Advanced.
Bart J.F. De Smet Software Development Engineer Microsoft Corporation Session Code: DTL315.
Forthcoming SQL Azure Services: SQL Azure Data Sync & SQL Azure Reporting Mark Scurrell Lead Program Manager Microsoft.
Functional Programming IN NON-FUNCTIONAL LANGUAGES.
Jonathan Aneja Program Manager Microsoft Corporation Session Code: DTL336 Anders Hejlsberg Technical Fellow Microsoft Corporation.
Building Robust, Maintainable Coded UI Tests with Visual Studio 2010 Brian Keller Sr. Technical Evangelist – Visual Studio ALM
To OData or Not to OData Chris Eargle kodefuguru.com.
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
Async Made Simple in Windows 8, with C# and Visual Basic Alex Turner Program Manager VB/C# Compilers Microsoft Corporation DEV332.
First appeared Features Popular uses Basic This language emphasises on ease of use, allowing general purpose programming to those with a small amount of.
THE FUTURE OF C#: GOOD THINGS COME TO THOSE WHO ‘AWAIT’ Joseph Albahari SESSION CODE: DEV411 (c) 2011 Microsoft. All rights reserved.
The language focusses on ease of use
Introduction to Operating Systems
Concepts of Programming Languages
Asynchronous Programming with C# v.Next
The Future of C# and Visual Basic
Dive into Application Lifecycle Management with Visual Studio 2010
Spark Presentation.
Automating AD Administration with Windows PowerShell
Rock Hard: C++ Evolving
Evolution of programming languages
Software Programming J. Holvikivi 2014.
SharePoint & jQuery: Better Together
12/2/2018 4:10 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
F# 3.0: data, services, Web, cloud, at your fingertips
F# for Parallel and Asynchronous Programming
TechEd /9/2018 4:17 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Unlocking the secrets of REST with WCF
WCF Web API, HTTP your way
Chris Eargle kodefuguru.com
Principles of Programming Languages
Functional Programming and Haskell
IS 135 Business Programming
Functional Programming and Haskell
Presentation transcript:

Trends in Programming Languages Bart J.F. De Smet blogs.bartdesmet.net/bart

DEMO The Good Old Days?

Looking at the Past… Assembler Procedural Objects Managed Richer Runtimes Ease of Use Richer Runtimes Ease of Use More Control Too low-level More Control Too low-level

Languages, Frameworks, Tools

Hardware Trends x 10,000 x 100,000 x 1,000 What about SSD? What about NUMA? What about many-core?

Aim Higher or Lower? Higher Levels of Abstraction Richer Frameworks (e.g..NET) Language Innovation (e.g. C#) Improved Expressiveness (e.g. FP) Low-Level Plumbing Can we avoid the disconnect? Machine Architectures (e.g. ARM) Power Consumption (e.g. phone) Rich Capabilities (e.g. GPU)

Two Stories on Bridging the Gaps GPU Acceleration Asynchronous I/O Win32 APIs Common Language Runtime Task Parallel Library C# and VB vNext DirectX APIs Internet Explorer 9 Rendering HTML 5 Canvas User System Established Reality! Rocket Science? Time

Software Trends 8 Horse-power of many-core… …but how to program those? Concurrent Say what you want… …not how it has to be done? Declarative Schematized, static, dynamic… …so, what’s the sweet spot? Dynamic New level of expressiveness… …how about the essence? Functional But will it blend?

FUNCTIONAL PROGRAMMING Increasing the level of abstraction

A Different Approach Theory of Computation (Lambda Calculus, Alonzo Church) LISP Heritage Reality of Hardware (Memory, John Von Neumann) Fortran Heritage Basic SmallTalk Modula C C++ Java C# Scheme SASL Haskell ML Miranda CLU

Lambda Expressions are All Around Us var res = xs.Where(x => x % 2 == 0); C# Dim res = xs.Where(Function(x) x Mod 2 = 0) Visual Basic let res = xs |> Seq.filter (fun x -> x % 2 = 0); F# var res = xs.filter(function(x) { return x % 2 == 0; }); JavaScript auto res = find_if(xs.begin(), xs.end(), [] (int i) { return x % 2 == 0; }); C++0x

What’s the Buzz About? Why? What? How? John Hughes F# Clojure Scala LISP Haskell

Have We Forgotten About Math? x = x + 1

Defining Functions No notion of time

Aargh… Those Pesky Side-Effects let equal = sin(0.0) = sin(0.0) let sinzero = sin(0.0) in sinzero = sinzero Binds name to value Equality != assignment let equal = DateTime.Now = DateTime.Now let now = DateTime.Now in now = now Not a pure function… Immutability is the default

But We Like Side-Effects So Much… // C# syntax static void Main(string[] args) { Console.WriteLine(args.Length); } (* F# syntax *) let main (args : string array) = printf "%d\n" args.Length val main : string array -> unit In Haskell: IO unit I/O is a side-effect Philip Wadler Hmm… monads

Programming in a Functional Style FP First class functions Immutable data Referential transparency Algebraic data types Type inference Pattern matching Essence Niceties But what’s a function?

F# – A General-Purpose Functional Style Language Visual Studio.NETFunctional F#

DEMO Functional Programming Programming with Functions

An Exercise In Purity? $$$ $ Impure Pure Purify yourselves, sinners! Erik MeijerSimon Peyton-Jones Where does F# fit?

DYNAMIC PROGRAMMING The world isn’t always typed

Dynamic vs. Static Dynamic Languages Simple and succinctImplicitly typedMeta-programmingNo compilation Static Languages RobustPerformantIntelligent toolsBetter scaling REST JavaScript Ruby JSON Python

It’s a Dynamic World Trend on non-schematized data Remember WSDL, SOAP, XSD? How about REST, JSON? The next browser war JavaScript on the web Optimized scripting engines Towards metaprogramming? Ruby community Code as data

32-bit value Type tag 32-bit value Type tag 32-bit value Loop back to dispatcher Fetch next byte code Call generic add handler Check for overflow Store type tag of result Store value of result Load type tag of a Load type tag of i Select add operation Load value of a Load value of i Dynamic vs. Static var a = 0; for (var i = 0; i < n; i++) { a = a + i; } ADD instruction X int a a i i

Dynamic VM Advances Interpretation Dynamic Typing Operation X Interpreter Dynamic Typing Operation 3-10 X JIT Compiler Operation 2-3 X Adaptive JIT Compiler Inline Caching Type Specialization Hidden Classes Tracing Inline Caching Type Specialization Hidden Classes Tracing

Python Binder Ruby Binder COM Binder JavaScript Binder Object Binder.NET Dynamic Programming Dynamic Language Runtime Expression Trees Dynamic Dispatch Call Site Caching IronPythonIronPythonIronRubyIronRubyC#C#VB.NETVB.NETOthers…Others…

DEMO Dynamic Code and Data

Compiler as a Service 28 Class Field public Foo private string X X Compiler Source code Source File Source code.NET Assembly Meta-programmingRead-Eval-Print Loop Language Object Model DSL Embedding

CONCURRENT PROGRAMMING Dealing with hardware reality

Taming the Concurrency Monster Can you keep the cores busy? Gordon Moore

…can be hard Concurrent programming with shared state…

Operating System Threads Parallel Extensions in.NET 4 Parallel LINQ Task Parallel Library Coordination Data Structures CPU …

Task- oriented Data- oriented Rich composition Coordination and scheduling TPL Task PLINQ CDS, etc. Continuations Task Parallel Library in.NET 4

Expressing Parallelism – A Library Approach int[,] Multiply(int[,] m1, int[,] m2) { int m, n, o; // Left as an exercise var res = new int[m, o]; Parallel.For(0, m, i => { for (int j = 0; j < o; j++) { res[i, j] = 0; for (int k = 0; k < n; k++) { res[i, j] += m1[i, k] * m2[k, j]; } }); return res; } int[,] Multiply(int[,] m1, int[,] m2) { int m, n, o; // Left as an exercise var res = new int[m, o]; for (int i = 0; i < m; i++) { for (int j = 0; j < o; j++) { res[i, j] = 0; for (int k = 0; k < n; k++) { res[i, j] += m1[i, k] * m2[k, j]; } return res; } Embarrassingly Parallel Lambda expressions to the rescue

Expressing Parallelism – A Library Approach var source = Enumerable.Range(1, 10000); var res = from x in source.AsParallel() where f(x) select g(x); res.ForAll(x => { Process(x); }); var source = Enumerable.Range(1, 10000); var res = from x in source where f(x) select g(x); foreach (var x in res) Process(x); Natural Data Parallelism Extension methods to the rescue

Asynchronous Programming – Low Hanging Fruit? Your Program Here Events triggered I/O completed Packet received Events Callbacks Reactive

Asynchronous Programming Simplified 37 Don’t block! UI programming, Windows Phone 7, Silverlight Latency ahead! Dealing with networks, services, cloud A blocking call! var data = DownloadData(…); ProcessData(data); Callback twists your code inside out var data = DownloadDataAsync(…, data => { ProcessData(data); }); var data = await DownloadDataAsync(…); ProcessData(data); No longer blocking! Visual Studio Async CTP

DEMO Using the TPL and the Async CTP

Potential Language Constructs Immutability Purity Isolation

DECLARATIVE PROGRAMMING Just say what you want

Domain Specific Languages DSLGPPL DSL External DSLInternal DSL

External DSLs SELECT Name, Address, City FROM Customers WHERE Country = "Belgium" rm -f /tmp/listing.tmp > /dev/null 2>&1 touch /tmp/listing.tmp ls -l [a-z]*.doc | sort > /tmp/listing.tmp lpr -Ppostscript_1 /tmp/listing.tmp rm -f /tmp/listing.tmp

Internal DSLs class Order < ActiveRecord::Base belongs_to :customer has_many :details end var query = db.Customers.Where(c => c.City == "London").OrderBy(c => c.CompanyName).Select(c => c.CompanyName); $(document).ready(function() { $("a").hover(function() { $(this).parents("p").addClass("highlight"); }, function() { $(this).parents("p").removeClass("highlight"); });

DEMO LINQ as an Internal DSL

Exciting Times 45 Horse-power of many-core… …but how to program those? Concurrent Say what you want… …not how it has to be done? Declarative Schematized, static, dynamic… …so, what’s the sweet spot? Dynamic New level of expressiveness… …how about the essence? Functional

Stay up to date with MSDN Belux Register for our newsletters and stay up to date: Technical updates Event announcements and registration Top downloads Follow our blog Join us on Facebook LinkedIn: Download MSDN/TechNet Desktop Gadget

TechDays 2011 On-Demand Watch this session on-demand via Channel9 Download to your favorite MP3 or video player Get access to slides and recommended resources by the speakers

THANK YOU