SlideShare una empresa de Scribd logo
1 de 43
Roslyn
TALENTSOFT R&D Academy 27/03/2014
Compilateur as A Service
► [Introduction]Compilateur et méta programmation
► Roslyn
► [Coding]Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
► [Introduction]Compilateur et méta programmation
► Roslyn
► [Coding]Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
Compilateur et meta-programmation
Définition
La métaprogrammation désigne l'écriture de
programmes qui manipulent des données décrivant
elles-mêmes des programmes.
Wikipédia
Compilateur et meta-programmation
Compilateurs
Compilateur et meta-programmation
Compilateurs
var x = 10;
var y = 20;
if(x == y)
{
}
IL_0001: ldc.i4.s 0A
IL_0003: stloc.0
IL_0004: ldc.i4.s 14
IL_0006: stloc.1
IL_0007: ldloc.0
IL_0008: ldloc.1
IL_0009: ceq
IL_000B: ldc.i4.0
IL_000C: ceq
IL_000E: stloc.2
IL_000F: ldloc.2
IL_0010: brtrue.s IL_0014
IL_0012: nop
► [Introduction]Compilateur et méta programmation
► Roslyn
► [Coding]Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
Roslyn
Octobre
2011
Community
Technology Preview
Evangélisation
(MVP Matthieu Mezil)
2012
Février
Major Updates
& Breaking
changes
Septembre
2012
Roslyn
Octobre
2011
Community
Technology Preview
Evangélisation
(MVP Matthieu Mezil)
2012
Février
Major Updates
& Breaking
changes
Septembre
2012
Eric Lippert « Principal
Developer » quitte
Microsoft pour Coverity
Novembre 2012
Novembre 2012
Eric Lippert « Principal
Developer » quitte
Microsoft pour Coverity
Dogfooding de
Roslyn
Décembre 2013
Dogfooding de
Roslyn
Décembre 2013
Roslyn
Ressources
 Api & templates téléchargeables
pour VS 2012.
 Exemple format Word
 Packages NuGet
Disponible pour les
autres versions de
Visual Studio.
Roslyn
Compilateur As A Service
Compiler APIs
Scripting APIs
Services APIs
Editor Services
APIs
4APIs
Roslyn
Compiler APIs
Scripting APIs
Services APIs
Editor Services
APIs
4APIs
Roslyn
Compiler APIs
Scripting APIs
Services APIs
Editor Services
APIs
4APIs
Roslyn
Compiler APIs
Scripting APIs
Services APIs
Editor Services
APIs
4APIs
Roslyn
Compiler APIs
Scripting APIs
Services APIs
Editor Services
APIs
4APIs
Roslyn
Roslyn
Templates VS 2012
► [Introduction] Compilateur et méta programmation
► Roslyn
► [Coding] Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
[Coding] Syntaxe et Sémantique
Workspace
[Coding] Syntaxe et Sémantique
Prérequis
[Coding] Syntaxe et Sémantique
Grammaire & langage
Grammaire (Arbre syntaxique)
 ArgumentListSyntax  paramètre de méthode
 ClassDeclarationSyntax  déclaration d’une classe
 ExpressionStatementSyntax  ligne de code
 UsingDirectiveSyntax  using d’un namespace
 ...
Sémantique (Symbol)
 SemanticModel
 GetTypeInfo()  résultat de l’expression
 (struct) CommonSymbolKind.Event
 .Field
 .Property
[Coding] Syntaxe et Sémantique
Syntax
SyntaxNode: Blue
SyntaxToken: Green
SyntaxTrivia: Red
using System;
using System.Collections.Generic;
using System.Linq;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World");
}
}
<Live Coding>
[Coding] Syntaxe et Sémantique
[Coding] Syntaxe et Sémantique
[Coding] Syntaxe et Sémantique
ExpressionStatementSyntax
BinaryExpressionSyntax
IdentifierNameSyntax InvocationExpressionSyntax
[Coding] Syntaxe et Sémantique
InvocationExpressionSyntax
MemberAccessExpressionSyntax
ArgumentListSyntax
IdentifierNameSyntax IdentifierNameSyntax
</Live Coding>
► [Introduction] Compilateur et méta programmation
► Roslyn
► [Coding] Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
[Demo] Scripting et Compilation
Script CS
scriptcs makes it easy to write and execute C# with a simple text editor.
C:> scriptcs scriptcs (ctrl-c or blank to exit)
> var message = "Hello, world!"; >
Console.WriteLine(message); Hello, world! >
[Demo] Scripting et Compilation
Demo
► [Introduction] Compilateur et méta programmation
► Roslyn
► [Coding] Syntaxe et Sémantique
► [Demo] Scripting et Compilation
► Le projet et son avenir
Agenda
Le projet et son avenir
Actuellement
 Dogfooding
 Build 2014
 Balbutiement dans la communauté
Le projet et son avenir
Wish-list
 Meilleur documentation (à jour!)
 Full-Compatible avec VS 2013
 Le retour de l’analyseur syntaxique
 AOP
Roslyn

Más contenido relacionado

La actualidad más candente

Cours structures des données (langage c)
Cours structures des données (langage c)Cours structures des données (langage c)
Cours structures des données (langage c)rezgui mohamed
 
Seance 2 - Programmation en langage C
Seance 2 - Programmation en langage CSeance 2 - Programmation en langage C
Seance 2 - Programmation en langage CFahad Golra
 
Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Aziz Darouichi
 
Cours de programmation en c
Cours de programmation en cCours de programmation en c
Cours de programmation en cbenouini rachid
 
Formation C# - Cours 3 - Programmation objet
Formation C# - Cours 3 - Programmation objetFormation C# - Cours 3 - Programmation objet
Formation C# - Cours 3 - Programmation objetkemenaran
 
Formation C# - Cours 4
Formation C# - Cours 4Formation C# - Cours 4
Formation C# - Cours 4kemenaran
 
Chap 6 : classes et interfaces
Chap 6 : classes et interfacesChap 6 : classes et interfaces
Chap 6 : classes et interfacesAziz Darouichi
 
Cours Visual Basic.NET
Cours Visual Basic.NETCours Visual Basic.NET
Cours Visual Basic.NETAziz Darouichi
 
Cours c#
Cours c#Cours c#
Cours c#zan
 
C# et .NET : Enigmes et puzzles
C# et .NET : Enigmes  et puzzlesC# et .NET : Enigmes  et puzzles
C# et .NET : Enigmes et puzzlesMicrosoft
 
Chapitre2fonctionscppv2019
Chapitre2fonctionscppv2019Chapitre2fonctionscppv2019
Chapitre2fonctionscppv2019Aziz Darouichi
 
Langage C
Langage  CLangage  C
Langage Cjwilili
 
TP4 Atelier C++ /GL2 INSAT / Tunisie
TP4 Atelier C++ /GL2 INSAT / TunisieTP4 Atelier C++ /GL2 INSAT / Tunisie
TP4 Atelier C++ /GL2 INSAT / TunisieMariem ZAOUALI
 
TP3 Atelier C++/ GL2 INSAT / Tunisie
TP3 Atelier C++/ GL2 INSAT / TunisieTP3 Atelier C++/ GL2 INSAT / Tunisie
TP3 Atelier C++/ GL2 INSAT / TunisieMariem ZAOUALI
 

La actualidad más candente (20)

Cours structures des données (langage c)
Cours structures des données (langage c)Cours structures des données (langage c)
Cours structures des données (langage c)
 
Seance 2 - Programmation en langage C
Seance 2 - Programmation en langage CSeance 2 - Programmation en langage C
Seance 2 - Programmation en langage C
 
Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références Chapitre4: Pointeurs et références
Chapitre4: Pointeurs et références
 
Chap1: Cours en C++
Chap1: Cours en C++Chap1: Cours en C++
Chap1: Cours en C++
 
Cours de programmation en c
Cours de programmation en cCours de programmation en c
Cours de programmation en c
 
Formation C# - Cours 3 - Programmation objet
Formation C# - Cours 3 - Programmation objetFormation C# - Cours 3 - Programmation objet
Formation C# - Cours 3 - Programmation objet
 
Formation C# - Cours 4
Formation C# - Cours 4Formation C# - Cours 4
Formation C# - Cours 4
 
Chap 6 : classes et interfaces
Chap 6 : classes et interfacesChap 6 : classes et interfaces
Chap 6 : classes et interfaces
 
Cours Visual Basic.NET
Cours Visual Basic.NETCours Visual Basic.NET
Cours Visual Basic.NET
 
Cours de c
Cours de cCours de c
Cours de c
 
Cours c#
Cours c#Cours c#
Cours c#
 
Le langage C
Le langage CLe langage C
Le langage C
 
Linq Tech Days08 Lux
Linq Tech Days08 LuxLinq Tech Days08 Lux
Linq Tech Days08 Lux
 
C# et .NET : Enigmes et puzzles
C# et .NET : Enigmes  et puzzlesC# et .NET : Enigmes  et puzzles
C# et .NET : Enigmes et puzzles
 
Chapitre2fonctionscppv2019
Chapitre2fonctionscppv2019Chapitre2fonctionscppv2019
Chapitre2fonctionscppv2019
 
Chap2fonctionscpp
Chap2fonctionscppChap2fonctionscpp
Chap2fonctionscpp
 
Langage C
Langage  CLangage  C
Langage C
 
Cours langage-c
Cours langage-cCours langage-c
Cours langage-c
 
TP4 Atelier C++ /GL2 INSAT / Tunisie
TP4 Atelier C++ /GL2 INSAT / TunisieTP4 Atelier C++ /GL2 INSAT / Tunisie
TP4 Atelier C++ /GL2 INSAT / Tunisie
 
TP3 Atelier C++/ GL2 INSAT / Tunisie
TP3 Atelier C++/ GL2 INSAT / TunisieTP3 Atelier C++/ GL2 INSAT / Tunisie
TP3 Atelier C++/ GL2 INSAT / Tunisie
 

Destacado

Roslyn compiler as a service
Roslyn compiler as a serviceRoslyn compiler as a service
Roslyn compiler as a serviceEugene Zharkov
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)maditabalnco
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsBarry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome EconomyHelge Tennø
 

Destacado (6)

Le garbage collector .NEt
Le garbage collector .NEtLe garbage collector .NEt
Le garbage collector .NEt
 
Messaging
MessagingMessaging
Messaging
 
Roslyn compiler as a service
Roslyn compiler as a serviceRoslyn compiler as a service
Roslyn compiler as a service
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Similar a Roslyn

Visual Studio 2008 Overview
Visual Studio 2008 OverviewVisual Studio 2008 Overview
Visual Studio 2008 OverviewGregory Renard
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) univalence
 
Linq et Entity framework
Linq et Entity frameworkLinq et Entity framework
Linq et Entity frameworkDNG Consulting
 
Introdot Netc Sharp Fr
Introdot Netc Sharp FrIntrodot Netc Sharp Fr
Introdot Netc Sharp FrGregory Renard
 
L’environnement de programmation fonctionnelle DrRacket
L’environnement de programmation fonctionnelle DrRacketL’environnement de programmation fonctionnelle DrRacket
L’environnement de programmation fonctionnelle DrRacketStéphane Legrand
 
201303 - Java8
201303 - Java8201303 - Java8
201303 - Java8lyonjug
 
Langage de Programmation.pdf
Langage de Programmation.pdfLangage de Programmation.pdf
Langage de Programmation.pdfAboubacarDiarra10
 
Réutilisation de code entre windows 8 et windows phone 8
Réutilisation de code entre windows 8 et windows phone 8Réutilisation de code entre windows 8 et windows phone 8
Réutilisation de code entre windows 8 et windows phone 8Arnaud Auroux
 
Développement de plug in sous eclipse
Développement de plug in sous eclipseDéveloppement de plug in sous eclipse
Développement de plug in sous eclipseISIG
 
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0Gregory Renard
 

Similar a Roslyn (20)

Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)
 
Visual Studio 2008 Overview
Visual Studio 2008 OverviewVisual Studio 2008 Overview
Visual Studio 2008 Overview
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
 
Linq et Entity framework
Linq et Entity frameworkLinq et Entity framework
Linq et Entity framework
 
Lmo05.ppt
Lmo05.pptLmo05.ppt
Lmo05.ppt
 
Vs2008 Linq
Vs2008 LinqVs2008 Linq
Vs2008 Linq
 
Dynamic Languages
Dynamic LanguagesDynamic Languages
Dynamic Languages
 
Introdot Netc Sharp Fr
Introdot Netc Sharp FrIntrodot Netc Sharp Fr
Introdot Netc Sharp Fr
 
L’environnement de programmation fonctionnelle DrRacket
L’environnement de programmation fonctionnelle DrRacketL’environnement de programmation fonctionnelle DrRacket
L’environnement de programmation fonctionnelle DrRacket
 
030225+seminar+gelo+diro.ppt
030225+seminar+gelo+diro.ppt030225+seminar+gelo+diro.ppt
030225+seminar+gelo+diro.ppt
 
201303 - Java8
201303 - Java8201303 - Java8
201303 - Java8
 
ATL et SVG
ATL et SVGATL et SVG
ATL et SVG
 
Langage de Programmation.pdf
Langage de Programmation.pdfLangage de Programmation.pdf
Langage de Programmation.pdf
 
Diapo PFE
Diapo PFEDiapo PFE
Diapo PFE
 
compilation1-2020.pdf
compilation1-2020.pdfcompilation1-2020.pdf
compilation1-2020.pdf
 
Réutilisation de code entre windows 8 et windows phone 8
Réutilisation de code entre windows 8 et windows phone 8Réutilisation de code entre windows 8 et windows phone 8
Réutilisation de code entre windows 8 et windows phone 8
 
Développement de plug in sous eclipse
Développement de plug in sous eclipseDéveloppement de plug in sous eclipse
Développement de plug in sous eclipse
 
040423+seminar+info+uqam.ppt
040423+seminar+info+uqam.ppt040423+seminar+info+uqam.ppt
040423+seminar+info+uqam.ppt
 
Jcom02.ppt
Jcom02.pptJcom02.ppt
Jcom02.ppt
 
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0
Visual Basic 9.0 – Visual Studio 2008 Quoi De Neuf 2.0
 

Roslyn