the future of c# kevin pilch-bisson [email protected] mads torgersen...

9
THE FUTURE OF C# KEVIN PILCH-BISSON [email protected] MADS TORGERSEN [email protected]

Upload: arlene-price

Post on 17-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

THE FUTURE OF C#

KEVIN PILCH-BISSON

[email protected]

MADS TORGERSEN

[email protected]

Page 2: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

PROJECT ROSLYN

A reimplementation of C# and VB compilers

In C# and VB

With rich public APIs

On CodePlex

The .NET compiler platform

Page 3: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

WHY ROSLYN?

TeamClean architecture to evolve on

PartnersSource-based tools and extensions

DevelopersRicher C# IDE experience

OSS

1,000,000s

1,000s

10s

Page 4: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

ROSLYN DEMO

Rich IDE experiences

Custom diagnostics

New language features

Page 5: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

RICH IDE EXPERIENCES

Inline Rename with conflict detection

More refactorings: Introduce local Inline temp

Lightbulbs to quickly fix up your code

Small improvements throughout: Colorization in quick info, signature help, outlining tooltips Smarter case matching in Completion

Page 6: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

CUSTOM DIAGNOSTICS

Easily detect common coding problems

Run live in the IDE

Can attach “quick fixes” to them as well

Run as part of command line/team builds

Distribute together with a library on NuGet

Page 7: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

LANGUAGE FEATURESUsing static members using System.Console; … Write(4);

Primary Constructors class Point(int x, int y) { … }

Auto-property Initializers public int X { get; set; } = x;

Getter-only auto-properties

public int Y { get; } = y;

Index initializers new JObject { ["x"] = 3, ["y"] = 4 }

Declaration Expressions int.TryParse(s, out var x);

Await in catch/finally try { … } catch { await … } finally { await … }

Exception Filters catch (E e) if (e.Count == 0) { }

Null Propagation Operator customer?.Orders?[5].Price

Page 8: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

CALL TO ACTION

Use the IDE and language features

Dip your toes in custom diagnostics

Consider forking the compiler source

Give us feedback

Page 9: THE FUTURE OF C# KEVIN PILCH-BISSON kevinpi@microsoft.com MADS TORGERSEN mads.torgersen@microsoft.com

ROSLYN, C# AND VB RESOURCES

MSDN - http://www.msdn.com/roslyn

Roslyn Preview for VS 2013 - http://aka.ms/Roslyn

Download VS “14” CTP - http://www.visualstudio.com/en-us/downloads/visual-studio-14-ctp-vs

CodePlex - http://roslyn.codeplex.com

Roslyn source browser - http://source.roslyn.codeplex.com