Presentation is loading. Please wait.

Presentation is loading. Please wait.

Future of C# Umamaheswaran @UMW1990.

Similar presentations


Presentation on theme: "Future of C# Umamaheswaran @UMW1990."— Presentation transcript:

1 Future of C# Umamaheswaran @UMW1990

2 Stack Overflow – most popular technologies

3 Stack Overflow – most loved technologies

4 .NET Language Strategy 1,000,000’s C# 100,000’s VB 10,000’s F#
Millions VB 100,000’s Hundreds of thousands F# 10,000’s Tens of thousands

5 C#: The road ahead C# 7.0 It’s there use it C# 7.1
First point release – tiny features C# 7.2 Safe efficient low level code C# 7.3 Next steps for pattern matching C# 8.0 Major features

6 C# 8.0 Async streams and disposables
IAsyncEnumerable<Person> people = database.GetPeopleAsync(); foreach await (var p in people) { … } using await (IAsyncDisposable resource = await store.GetRecordAsync(…)) { … }

7 C# 8.0 extension everything
extension Enrollee extends Person { // static field static Dictionary<Person, Professor> enrollees = new Dictionary<Person, Professor>(); // instance method public void Enroll(Professor supervisor) { enrollees[this] = supervisor; } // instance property public Professor Supervisor => enrollees.TryGetValue(this, out var supervisor) ? supervisor : null; // static property public static ICollection<Person> Students => enrollees.Keys; // instance constructor public Person(string name, Professor supervisor) : this(name) { this.Enroll(supervisor); } }

8 C# 8.0 Records class Person(string First, string Last);
class Person : IEquatable<Person> { public string First { get; } public string Last { get; } public Person(string First, string Last) => (this.First, this.Last) = (First, Last); public void Deconstruct(out string First, out string Last) => (First, Last) = (this.First, this.Last); public bool Equals(Person other) => other != null && First == other.First && Last == other.Last; public override bool Equals(object obj) => obj is Person other ? Equals(other) : false; public override int GetHashCode() => GreatHashFunction(First, Last); }

9 Resources Language strategy C# design Roslyn
blogs.msdn.microsoft.com/dotnet/2017/02/01/the-net-language-strategy/ blogs.msdn.microsoft.com/vbteam/2017/02/01/digging-deeper-into-the-visual-basic-language-strategy/ C# design github.com/dotnet/csharplang blogs.msdn.microsoft.com/dotnet/2017/03/09/new-features-in-c-7-0/ Roslyn github.com/dotnet/roslyn

10 Thank you


Download ppt "Future of C# Umamaheswaran @UMW1990."

Similar presentations


Ads by Google