C# Today and Tomorrow

Download C# Today and Tomorrow

Post on 22-Jan-2018




0 download

Embed Size (px)


  1. 1. C# Today & Tomorrow
  2. 2. http://stackoverflow.com/research/developer-survey-2015
  3. 3. http://stackoverflow.com/research/developer-survey-2015
  4. 4. http://stackoverflow.com/research/developer-survey-2015
  5. 5. Changing our tune Run on Windows .NET as system component Run on VM (CLR) Black box compilers Edit in Visual Studio Proprietary Run everywhere Deploy with app Compile to native Open compiler APIs Use your favorite editor Open source
  6. 6. Project Roslyn Lets rewrite the C# and VB compilers and IDE from scratch! Evolve Enable Dogfood
  7. 7. The compiler/IDE dichotomy Compiler Batch Throughput Correctness Prevent badness Reactive to what you did IDE Incremental Responsiveness Error tolerance Enable goodness Predictive of what you will do
  8. 8. The Roslyn Compiler API There should only need to be one code base in the world for understanding C#
  9. 9. Other IDEs On other platforms Custom diagnostics Style, API usage, patterns Source transformation Refactorings, fixers, migraters, updaters Scripting Batch scripts, hosted code Coding in execution REPL, edit-and-continue Documentation Hyperlinked API docs, web playgrounds Static analysis Code metrics, graphs, telemetry, code querying Metaprogramming Source generators, injectors, weavers Other language understanding scenarios
  10. 10. Custom analyzers and fixes Plug in to diagnostic reporting and code fixing infrastructure Batch and interactive Code-aware libraries APIs can ship with analyzers and fixes to guide their users Toolboxes Style enforcement, discovery of opportunities
  11. 11. Language evolution explained Stagnation C#
  12. 12. Evolution of C# C# 1 Hello World C# 2 Generics C# 3 Queries, Lambdas C# 4 Dynamic, Concurrency C# 5 Async C# 6 Avoid boilerplate C# 7 ???
  13. 13. Demo: REPL and C# 6
  14. 14. C# 7
  15. 15. Pattern matching if (o is Point p) { WriteLine($"({p.X}, {p.Y})"); } if (o is Point p && p.X == 5) { WriteLine($"Y: {p.Y}"); } if (o is Point(5, var y)) { WriteLine($"Y: {y}"); }