C#9 Changes Overview

preview_player
Показать описание
C# 9 changes overview, exciting stuff.

Timestamps:
00:00 introduction
00:13 top level statements
00:52 target type new expression
02:04 init property modifier
03:03 records
14:02 pattern matching
25:45 covariant results
27:45 natvie integer
28:57 static anonymous functions
29:54 lambda discard parameters
30:18 local function attributes
30:52 module initialization
31:43 GetEnumerator extension
32:34 partial class method extension
33:03 function pointers

Рекомендации по теме
Комментарии
Автор

thx for video. a record could be used as the implementation of value object in DDD pattern. previously you have to expand the constructor every time when introducing a new field

andreydaniloff
Автор

At 1:54 you are showing the types on Line 43 & Line 47 along with the “new”. Then you comment it out and the types disappear. What’s happening there. And similar happens when you uncomment that area of code beforehand.

DedicatedManagers
Автор

They recently introduced type inference `var _ = new Ctor()`, but now we have this `Ctor _ = new () {}`. Ohhh... I think it will be useful only when return something from function

pavelivanov
Автор

Great video ! Thanks for clarifyng all this stuff.
I am curious what is the actual demand for such a creation as "top level statements". I do not see any advantages and such a change is an additional confusion and difficulty for juniors. It is obvious that before this becomes popular among developers, it will be years and during this time the "traditional way" will be required.

megastarling
Автор

Do you think that records may change the one class -> one file when describing some domain objects with POCOs ?

niclo