Description
A quick overview of some of the new language features coming to C# 7.0.
For more details see our blog post.
Download
Download this episode
- MP3 (5.8 MB)
- Mid Quality MP4 (36.7 MB)
- High Quality MP4
The Discussion
-
Juanpa Magnificent, I realized that I have to add the System.ValueTuple nuget reference, any other in any case?. Is there any issue deploying to the store with all the new stuff? Hope not.
-
Jon Why would Item start at 1 and not 0?
-
Onurg Good, but looks like baby steps towards being a more functional language. I still can't understand what good are these features without things like records or algebraic data types. I guess time will tell.
-
Andrew Hanlon Unless this has changed in the release version (I hope it hasn't) than it seems there is a mistake within pattern matching example where the variable 'i' is used outside its if level scope. The roslyn pattern matching spec says:
The scope of a pattern variable is as follows:
- If the pattern appears in the condition of an if statement, its scope is the condition and controlled statement of the if statement, but not its else clause.
If this is correct than the i variable should not be in scope after the if. -
Josh Looks good.
-
Yossu Looking more like F# every release! That's a good thing by the way, it means we're getting some of the goodness that F# devs had had for a while.
-
Guy Cox How about an overrideable assigment operator.. That would go a long way to insuring dimensional integrity of computations involving physical quantities -- acceleration = velocity / time.. where each dimension is represented by a value on the measurement vector length, time, mass, charge
-
gigyjoseph Blog post link is wrongly formatted. https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
-
dumky @Jon: Item starts at 1 rather than 0 because of the legacy of System.Tuple types. System.ValueTuple is a very similar set of types, with the difference that they are structs.
That said, in C# tuples, elements can be named, so I don't expect to see that people use Item1, Item2, etc frequently.
For example:(string first, string last) person = GetAccount();
Console.WriteLine("{person.first} {person.last}");
-
Laying in My Bed Abas com(alto-,col-,con-,or cor-,)
-
gduncan411 @gigyjoseph:Fixed. Thanks for the heads up
-
Yonny Nice!!
(I don't know F#, but I know Python and these features make C# closer to Python than before. Good stuff) -
Kaelum Mads made a major change to scoping rules, stating that it was being asked for by everyone (no names given), and said that it's a done deal, no discussion. You can read about it here:
https://github.com/dotnet/roslyn/issues/12939Moving forward, it will be impossible to know what variables are in scope.
-
VivekRagunathan Hi Mads, When are we going to get read-only (const) variables like C++ const or java final. Read-only variables is an important step towards functional programming (grass root level). It would also be good if C# supports const methods like C++ to create immutable types. What do you think?
-
SWest Yeah, now is Erlang, you only miss receive -> and send !
-
lindexi What is the C# 7 release date?
-
Veera Pallati Great Features !!!.