roslyn: el futuro de c# y vb.net by rodolfo finochietti

29
Roslyn: el futuro de C# Rodolfo Finochietti [email protected] @rodolfof http://shockbyte.net

Upload: net-conf-uy

Post on 19-Jun-2015

159 views

Category:

Technology


1 download

DESCRIPTION

Roslyn: el futuro de C# y VB.NET Rodolfo Finochietti .NET Conf UY 2014 http://netconf.uy

TRANSCRIPT

2. Fundamentos de un compilador 3. class Program{void Main(){}} program.exeCSC - VBC 4. 5 5. 6 6. http://irony.codeplex.com 7. Roslyn 8. Windows ConvergenceUniversal projectsCloud Services.NET support forAzure Mobile ServicesWeb apps Native compilationASP.NET updates .NET NativeCore .NETRuntime CompilersNext gen JIT (RyuJIT)SIMD.NET Compiler Platform (Roslyn)Languages innovationAzure and Windows Server Windows DesktopOpennessWindows Store iOS and Android.NET in devices and services 9. Editor Services Code Actions Classification Completion Outlining Code Formatting Find All References Name Simplification SymbolAPIServicesCompilerSyntax TreeAPIBinding and FlowAnalysis APIsEmit APIScriptingAPIWorkspace API 10. Syntax Tree API NodesCompilationUnitTypeDeclarationMethodDeclarationclass C{void M(){}}// CParameterList Blockvar tree = CSharpSyntaxTree.ParseText("..."); 11. Syntax Tree API TokensCompilationUnitTypeDeclarationEOFclass C { MethodDeclaration }void M ParameterList Block( ) { }class C{void M(){}}// C 12. Syntax Tree API TriviaCompilationUnitTypeDeclarationEOFclass C { MethodDeclaration }SP EOL EOL // Cvoid M ParameterList Block( ){ }SPx4 SPEOLEOLSPx4 EOL SPx4 EOLclassC{voidM(){}}// C 13. Workspace APIHost EnvironmentEvents (e.g. key presses)WorkspaceSolutionEdit EditProject ProjectCompilationDocument DocumentApplySolution2 SolutionnSyntaxTree 14. C# 6 15. 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);}} 16. 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");} 17. http://goo.gl/4vtQfr 18. Preguntas? 19. http://irony.codeplex.comhttp://roslyn.codeplex.com 20. [email protected]://shockbyte.net