SlideShare una empresa de Scribd logo
1 de 29
rodolfof@lagash.com 
http://shockbyte.net
Fundamentos de un compilador
class Program 
{ 
void Main() 
{ 
} 
} ▫ 
program.exe 
CSC - VBC
5
6
http://irony.codeplex.com
Roslyn
Windows Convergence 
Universal projects 
Cloud Services 
.NET support for 
Azure Mobile Services 
Web apps Native compilation 
ASP.NET updates .NET Native 
Core .NET 
Runtime Compilers 
Next gen JIT (“RyuJIT”) 
SIMD 
.NET Compiler Platform (“Roslyn”) 
Languages innovation 
Azure and Windows Server Windows Desktop 
Openness 
Windows Store iOS and Android 
.NET in devices and services
Editor Services Code Actions Classification Completion Outlining … 
Code Formatting Find All References Name Simplification … 
Symbol 
API 
Services 
Compiler 
Syntax Tree 
API 
Binding and Flow 
Analysis APIs 
Emit API 
Scripting 
API 
Workspace API
Syntax Tree API – Nodes 
CompilationUnit 
TypeDeclaration 
MethodDeclaration 
class C 
{ 
void M() 
{ 
} 
}// C 
▫ 
ParameterList Block 
var tree = CSharpSyntaxTree.ParseText("...");
Syntax Tree API – Tokens 
CompilationUnit 
TypeDeclaration 
EOF 
class C { MethodDeclaration } 
void M ParameterList Block 
( ) { } 
class C 
{ 
void M() 
{ 
} 
}// C 
▫
Syntax Tree API – Trivia 
CompilationUnit 
TypeDeclaration 
EOF 
class C { MethodDeclaration } 
SP EOL EOL // C 
void M ParameterList Block 
( ) 
{ } 
SPx4 SP 
EOL 
EOL 
SPx4 EOL SPx4 EOL 
class∙C 
{ 
∙∙∙∙void∙M() 
∙∙∙∙{ 
∙∙∙∙} 
}// C 
▫
Workspace API 
Host Environment 
Events (e.g. key presses) 
Workspace 
Solution 
Edit Edit 
Project Project 
Compilation 
Document Document 
Apply 
Solution2 Solutionn 
SyntaxTree
C# 6
public class Point(int x, int y) 
{ 
public int X { get; } = x; 
public int Y { get; } = y; 
public double R { get; } = Math.Sqrt(x ^ x + y ^ y); 
public Point() : this(0, 0) 
{ } 
public override string ToString() 
{ 
return string.Format("({0},{1},{2})", X, Y, R); 
} 
}
try 
{ 
Task[] tasks = new Task[10]; 
for (int i = 0; i < 10; i++) 
{ 
tasks[i] = Task.Factory.StartNew(() => DoSomeWork(10000000)); 
} 
var res = await Task.WhenAll(tasks); 
} 
catch (AggregateException e) if (e.InnerExceptions.Count > 2) 
{ 
await WriteStatus(“filtered exception"); 
} 
finally 
{ 
await WriteStatus(“finished"); 
}
http://goo.gl/4vtQfr
¿Preguntas?
http://irony.codeplex.com 
http://roslyn.codeplex.com
¡ Gracias! 
rodolfof@lagash.com 
http://shockbyte.net

Más contenido relacionado

La actualidad más candente

Vancouver Erlang Meetup cferl & Mule Transport Plug
Vancouver Erlang Meetup cferl & Mule Transport PlugVancouver Erlang Meetup cferl & Mule Transport Plug
Vancouver Erlang Meetup cferl & Mule Transport Plug
David Dossot
 

La actualidad más candente (18)

GOCON Autumn (Story of our own Monitoring Agent in golang)
GOCON Autumn (Story of our own Monitoring Agent in golang)GOCON Autumn (Story of our own Monitoring Agent in golang)
GOCON Autumn (Story of our own Monitoring Agent in golang)
 
.Net passé, présent et futur
.Net passé, présent et futur.Net passé, présent et futur
.Net passé, présent et futur
 
“ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture” “ASP.NET Core. Features and architecture”
“ASP.NET Core. Features and architecture”
 
Flink Forward Berlin 2017: Dominik Bruhn - Deploying Flink Jobs as Docker Con...
Flink Forward Berlin 2017: Dominik Bruhn - Deploying Flink Jobs as Docker Con...Flink Forward Berlin 2017: Dominik Bruhn - Deploying Flink Jobs as Docker Con...
Flink Forward Berlin 2017: Dominik Bruhn - Deploying Flink Jobs as Docker Con...
 
Engineering Efficiency in LINE
Engineering Efficiency in LINEEngineering Efficiency in LINE
Engineering Efficiency in LINE
 
Akmal Khaleeq Waheed - Challenge 3 p2
Akmal Khaleeq Waheed - Challenge 3 p2Akmal Khaleeq Waheed - Challenge 3 p2
Akmal Khaleeq Waheed - Challenge 3 p2
 
Android: a full-stack to consume a REST API
Android: a full-stack to consume a REST APIAndroid: a full-stack to consume a REST API
Android: a full-stack to consume a REST API
 
Fast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPCFast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPC
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
Android kotlin coroutines
Android kotlin coroutinesAndroid kotlin coroutines
Android kotlin coroutines
 
Nodejs intro
Nodejs introNodejs intro
Nodejs intro
 
OHHttpStubs
OHHttpStubsOHHttpStubs
OHHttpStubs
 
Vancouver Erlang Meetup cferl & Mule Transport Plug
Vancouver Erlang Meetup cferl & Mule Transport PlugVancouver Erlang Meetup cferl & Mule Transport Plug
Vancouver Erlang Meetup cferl & Mule Transport Plug
 
DanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino API
 
What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0What's New in ASP.NET Core 2.0
What's New in ASP.NET Core 2.0
 
202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP202107 - Orion introduction - COSCUP
202107 - Orion introduction - COSCUP
 
Developer-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing oneDeveloper-friendly taskqueues: What you should ask yourself before choosing one
Developer-friendly taskqueues: What you should ask yourself before choosing one
 
Building RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDBBuilding RESTful Services With Go and MongoDB
Building RESTful Services With Go and MongoDB
 

Destacado (9)

Windows 10 Developer Readiness
Windows 10 Developer ReadinessWindows 10 Developer Readiness
Windows 10 Developer Readiness
 
ASP.NET 5
ASP.NET 5ASP.NET 5
ASP.NET 5
 
.NET Multiplataforma
.NET Multiplataforma .NET Multiplataforma
.NET Multiplataforma
 
Aplicaciones Real-Time con SignalR
Aplicaciones Real-Time con SignalRAplicaciones Real-Time con SignalR
Aplicaciones Real-Time con SignalR
 
Azure IoT Hub
Azure IoT HubAzure IoT Hub
Azure IoT Hub
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Introduccion a Node.js
Introduccion a Node.jsIntroduccion a Node.js
Introduccion a Node.js
 
IoT y Dispositivos
IoT y DispositivosIoT y Dispositivos
IoT y Dispositivos
 
Despliegue y Monitoreo de aplicaciones ASP.NET Core en Linux
Despliegue y Monitoreo de aplicaciones ASP.NET Core en LinuxDespliegue y Monitoreo de aplicaciones ASP.NET Core en Linux
Despliegue y Monitoreo de aplicaciones ASP.NET Core en Linux
 

Similar a Roslyn: el futuro de C#

JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개
Reagan Hwang
 
ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developers
Bartosz Kosarzycki
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
Luis Enrique
 

Similar a Roslyn: el futuro de C# (20)

ASP.NET
ASP.NETASP.NET
ASP.NET
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New Features
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
Kotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projectsKotlin Developer Starter in Android projects
Kotlin Developer Starter in Android projects
 
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016
 
JSLounge - TypeScript 소개
JSLounge - TypeScript 소개JSLounge - TypeScript 소개
JSLounge - TypeScript 소개
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
 
TechTalk - Dotnet
TechTalk - DotnetTechTalk - Dotnet
TechTalk - Dotnet
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»Дмитрий Верескун «Синтаксический сахар C#»
Дмитрий Верескун «Синтаксический сахар C#»
 
ADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developersADG Poznań - Kotlin for Android developers
ADG Poznań - Kotlin for Android developers
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Kotlin / Android Update
Kotlin / Android UpdateKotlin / Android Update
Kotlin / Android Update
 
Chapter04
Chapter04Chapter04
Chapter04
 
C# 6
C# 6C# 6
C# 6
 
Iron python
Iron pythonIron python
Iron python
 
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
 
Novidades do c# 7 e 8
Novidades do c# 7 e 8Novidades do c# 7 e 8
Novidades do c# 7 e 8
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET Developer
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
 

Más de Rodolfo Finochietti

Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladoresQue hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Rodolfo Finochietti
 

Más de Rodolfo Finochietti (20)

Introduction to Rust language programming
Introduction to Rust language programmingIntroduction to Rust language programming
Introduction to Rust language programming
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Go
GoGo
Go
 
Re-bot-lution
Re-bot-lutionRe-bot-lution
Re-bot-lution
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
 
Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013Proyectos de Base de Datos con Visual Studio 2013
Proyectos de Base de Datos con Visual Studio 2013
 
ALM con Visual Studio y TFS 2013
ALM con Visual Studio y TFS 2013ALM con Visual Studio y TFS 2013
ALM con Visual Studio y TFS 2013
 
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladoresQue hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
Que hay de nuevo en 2013 en la plataforma Microsoft para desarrolladores
 
Introducción a ASP.NET Web API
Introducción a ASP.NET Web APIIntroducción a ASP.NET Web API
Introducción a ASP.NET Web API
 
ASP.NET MVC Workshop Día 3
ASP.NET MVC Workshop Día 3ASP.NET MVC Workshop Día 3
ASP.NET MVC Workshop Día 3
 
ASP.NET MVC Workshop Día 2
ASP.NET MVC Workshop Día 2ASP.NET MVC Workshop Día 2
ASP.NET MVC Workshop Día 2
 
ASP.NET MVC Workshop Día 1
ASP.NET MVC Workshop Día 1ASP.NET MVC Workshop Día 1
ASP.NET MVC Workshop Día 1
 
HTML5 Media Queries
HTML5 Media QueriesHTML5 Media Queries
HTML5 Media Queries
 
HTML5 Offline
HTML5 OfflineHTML5 Offline
HTML5 Offline
 
Nuevas características para Desarrollo Web en Visual Studio 2012 y ASP.NET MVC 4
Nuevas características para Desarrollo Web en Visual Studio 2012 y ASP.NET MVC 4Nuevas características para Desarrollo Web en Visual Studio 2012 y ASP.NET MVC 4
Nuevas características para Desarrollo Web en Visual Studio 2012 y ASP.NET MVC 4
 
Desarrollo de aplicaciones Windows 8 Modern UI con Visual Studio 2012
Desarrollo de aplicaciones Windows 8 Modern UI con Visual Studio 2012Desarrollo de aplicaciones Windows 8 Modern UI con Visual Studio 2012
Desarrollo de aplicaciones Windows 8 Modern UI con Visual Studio 2012
 
Desarrollo de Aplicaciones Metro en Windows 8
Desarrollo de Aplicaciones Metro en Windows 8Desarrollo de Aplicaciones Metro en Windows 8
Desarrollo de Aplicaciones Metro en Windows 8
 
Introducción a WPF
Introducción a WPFIntroducción a WPF
Introducción a WPF
 
HTML5 Geolocalizacion
HTML5 GeolocalizacionHTML5 Geolocalizacion
HTML5 Geolocalizacion
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Roslyn: el futuro de C#

  • 2.
  • 3. Fundamentos de un compilador
  • 4. class Program { void Main() { } } ▫ program.exe CSC - VBC
  • 5. 5
  • 6. 6
  • 8.
  • 10.
  • 11. Windows Convergence Universal projects Cloud Services .NET support for Azure Mobile Services Web apps Native compilation ASP.NET updates .NET Native Core .NET Runtime Compilers Next gen JIT (“RyuJIT”) SIMD .NET Compiler Platform (“Roslyn”) Languages innovation Azure and Windows Server Windows Desktop Openness Windows Store iOS and Android .NET in devices and services
  • 12.
  • 13. Editor Services Code Actions Classification Completion Outlining … Code Formatting Find All References Name Simplification … Symbol API Services Compiler Syntax Tree API Binding and Flow Analysis APIs Emit API Scripting API Workspace API
  • 14. Syntax Tree API – Nodes CompilationUnit TypeDeclaration MethodDeclaration class C { void M() { } }// C ▫ ParameterList Block var tree = CSharpSyntaxTree.ParseText("...");
  • 15. Syntax Tree API – Tokens CompilationUnit TypeDeclaration EOF class C { MethodDeclaration } void M ParameterList Block ( ) { } class C { void M() { } }// C ▫
  • 16. Syntax Tree API – Trivia CompilationUnit TypeDeclaration EOF class C { MethodDeclaration } SP EOL EOL // C void M ParameterList Block ( ) { } SPx4 SP EOL EOL SPx4 EOL SPx4 EOL class∙C { ∙∙∙∙void∙M() ∙∙∙∙{ ∙∙∙∙} }// C ▫
  • 17.
  • 18. Workspace API Host Environment Events (e.g. key presses) Workspace Solution Edit Edit Project Project Compilation Document Document Apply Solution2 Solutionn SyntaxTree
  • 19.
  • 20. C# 6
  • 21. public class Point(int x, int y) { public int X { get; } = x; public int Y { get; } = y; public double R { get; } = Math.Sqrt(x ^ x + y ^ y); public Point() : this(0, 0) { } public override string ToString() { return string.Format("({0},{1},{2})", X, Y, R); } }
  • 22. try { Task[] tasks = new Task[10]; for (int i = 0; i < 10; i++) { tasks[i] = Task.Factory.StartNew(() => DoSomeWork(10000000)); } var res = await Task.WhenAll(tasks); } catch (AggregateException e) if (e.InnerExceptions.Count > 2) { await WriteStatus(“filtered exception"); } finally { await WriteStatus(“finished"); }
  • 23.
  • 24.
  • 26.
  • 29. ¡ Gracias! rodolfof@lagash.com http://shockbyte.net