Mads Torgersen #BlackLivesMatter Profile
Mads Torgersen #BlackLivesMatter

@MadsTorgersen

29,497
Followers
194
Following
14
Media
953
Statuses

I'm the lead designer of the C# language at Microsoft. Opinions are my own.

Joined December 2013
Don't wanna be here? Send us removal request.
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
I blogged a little walkthrough of the three major C# 8.0 features (nullable reference types, range and index expressions and async streams) shipping in Preview 1 of @VisualStudio 2019 and Preview 1 of .NET Core 3.0. Hope you like it!
19
322
659
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
Try C# 7.0 now! Read all about it here and tell us what you think!
9
483
487
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
The ECMA C# Standard committee meets in person for the first time in ten years!
Tweet media one
11
178
387
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
Visual Studio 2019 Preview 2 is out, and with it, switch expressions and recursive pattern matching in C#.
13
132
296
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
This is a great list of useful features missing from C#. They aren't fundamental flaws and could all be addressed; many are already on the radar for future versions. E.g. primary constructors are planned for C# 10.0, and could then be a building block for object expressions.
@dsymetweets
Don Syme
4 years
It's really strange what nonsense people put up with in C#. This business where expression results are implicitly discarded from statements is just insane in the 21st century. So much information loss just waiting to happen without even a warning.
26
70
299
14
47
294
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
C# 7.1 has been out for two months, but it's never too late to blog about it! (Ok, it kinda is when 7.2 releases...)
1
174
256
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
I thought about ways that you could allow interfaces to be implemented after the fact, separately from the original type declaration. This is long lead thinking, and we are not about to implement this in C#!
6
99
227
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
I just updated my C# 7.0 post on the #dotnet blog to actually match the features we released on Tuesday:
5
190
227
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Here I go again...
@terrajobst
Immo Landwerth
6 years
Here is what's coming in C# 8.0 (by @MadsTorgersen ).
33
382
616
13
63
184
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
My talk with @dcampbell at #MSBuild yesterday on the future of C# is up on @ch9 !
5
84
171
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Fantastic write-up on nullable reference types in C# 8.0!
@praeclarum
Frank A. Krueger
6 years
I wrote up my experiences converting a couple projects to C# 8's Nullable Reference support. It was a bit of work so I thought you might enjoy a little guide.
16
194
444
3
48
159
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
My #qconsf talk is up! If you have nothing better to do for the next 50-odd minutes, watch me talk about some of the features that we are exploring for the future of C#: nullable reference types, extension interfaces and asynchronous streams.
4
77
158
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
The prototype of nullable reference types is finally here! Read all about it here:
5
113
145
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
I wrote up our thinking on the strategy for C#, VB and F#:
14
147
137
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
Very cool harnessing of C# for high-performance programming!
@lucasmeijer
Lucas Meijer
5 years
Lots of C++ <-> game programming talk going on lately. Here is what we're thinking and doing about it at Unity:
58
365
1K
1
20
124
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
3 years
My talk on C#'s Functional Journey from #QCon Plus 2020 is now up on #InfoQ : This was a fun opportunity to look back on how much of C#'s evolution has been driven by ideas from functional languages.
3
38
117
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Check out @jaredpar 's great video about Span<T> and its merry friends. This is really moving the needle in a major way on safety, performance and expressiveness! I'm also super happy about the great collaboration between language, framework and runtime!
2
61
114
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
Didn't like the idea of @jonskeet not talking about C# 8.0 at #ndclondon , so I asked him to join me on stage for my Thursday talk:
@jonskeet
Jon Skeet
5 years
Heads up for #ndclondon attendees this week: we've replaced my C# 8 talk with a talk on versioning (as @MadsTorgersen and @billwagner will be talking a lot about C# 8 already). Hope you'll still find it interesting though - there's a lot to talk about!
4
5
48
2
10
111
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
3 years
I'm looking very much forward to joining Coders in Rio on Monday evening (July 12) for a chat about the future of C#!
1
21
90
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Phew! I'm finally caught up on C# 7.0 language design notes: Apologies for some of them being long in the making!
4
31
93
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
There I go again...
@dotnet
.NET
7 years
Watch @MadsTorgersen show us what's new with C# 7.1 & 7.2 and a preview of C# 8.0 #MSFTConnect
Tweet media one
3
173
275
6
39
87
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
So here it is! I sat down with Bryan to talk about my recent diagnosis with ADHD. He is a gentle, thoughtful interviewer, and it feels like a good way to share this new discovery of mine and the insights it's brought on for me.
@bryanjhogan
Bryan Hogan
2 years
Podcast: @MadsTorgersen talks about his recent diagnosis with Attention Deficit/Hyperactivity Disorder and how it has changed his life for the better. Listen - , or subscribe -
Tweet media one
1
3
28
7
10
86
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
I'm still trying to come to grips with the amount of systemic racism and brutality here in my adopted home country.
3
9
66
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@mikehadlow == on tuples should call == on the elements. That cannot be done as a == overload on the generic ValueTuple<> types. It must be done in the language. We're doing it in 7.3.
4
13
62
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Looking forward to once again joining @dcampbell at #MSBuild to talk about The Future of C#. Register:
2
16
63
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@nick_guerrera We are not likely to embrace (haha) significant white space in C# - ever! BUT, we are gradually trying to reduce the number of required curlies and levels of indentation (think expression-bodied members, using declarations, top-level programs).
9
1
58
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Stoked to be here! Thanks for the warm welcome!
@dbeniwal21
Dinesh Beniwal
6 years
Tweet media one
1
24
69
0
16
51
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@bryanjhogan Can you ask him how he manages to stay so good looking? Asking for a friend.
6
0
54
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
In Vegas I realized where my predecessors found inspiration for Language INtegrated Query. @ahejlsberg @amandaksilver @panopticoncntrl
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
9
49
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
10 years
Blogged about New features in C# 6 on the C# team blog: http://t.co/DRFfvXby67
2
85
49
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@davidfowl I don't have a clear favorite (they all use var, so that's taken care of! ๐Ÿ˜„), but I do want to point out that widgetsTwo is the only approach that doesn't require you to mention the Widget type again for every additional element.
1
0
50
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@ThatVBGuy Funny, when I was advocating for 'await' internally at Microsoft, I used Outlook as an example. ๐Ÿ˜„
1
0
45
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
9 years
Are you guys following along on GitHub as we design C# 7? A lot on non-nullable reference types lately.
6
61
44
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
Spent a wonderful half hour yesterday chatting with @JesseLiberty about C# 7.0 on his delightful #YetAnotherPodcast :
0
31
42
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
Oh no - it looks like my #MSFTConnect talking head video on C# 7.0 is out: I'll never get used to it.
5
28
41
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@praeclarum @nick_guerrera Sorry if I was mean! We are trying to remove more of those {'s and }'s as we evolve the language. It might lead to a net increase in ;'s though! ๐Ÿ˜„ E.g. (proposed for C# 10): namespace Foo { class Awesome { ... } } vs namespace Foo; // <-- semicolon! class Awesome { ... }
6
0
41
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@RehanSaeedUK That's the general idea. We would probably add a `;` to the end of it to make it match other one-line file-level directives (`using` etc).
5
0
35
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
This is lovely! Also, once you've enjoyed it (or before or during...) don't forget that this is a fundraiser. Donate here:
@jonskeet
Jon Skeet
6 years
My video of "reading the C# 6 draft specification by the fire" is now up! Many thanks again to so many generous donors, and (grudgingly) to @blowdart for the idea. (I believe the higher resolution versions are still processing. It will be 1080p eventually)
19
148
403
1
10
33
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
I hope this is helpful to folks. Maybe you know someone or have an aha moment of your own. Mostly I hope being open about it in some small way helps normalize talking about neurodiversity.
3
0
33
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
@davidfowl You can't inherit from interfaces. If you want inheritable public members you still need to put them in a base class. So I don't think this feature will make much of a dent in the use of abstract base classes.
2
1
32
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Love seeing @bleroy already making great use of C# pattern matching in his Minecraft client serialization code:
3
14
31
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
Almost 48 hours: Still can't wipe that stupid grin off my face - maybe because my hands are still in the air! ;-) #msxamarin @migueldeicaza
2
13
32
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Wonderful compiler 101 from @ThatVBGuy !
@ThatVBGuy
Anthony D. Green
7 years
Curious about contributing to Roslyn but don't know where to start? Start here: 2nd post soon to come!
2
15
26
0
5
29
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
Fantastic talk by @DennieDeclercq at #MSIgnite19 ! Super clear, informative, practical and well-presented content on having a coworker with autism.
Tweet media one
1
8
29
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@dustinmoris We've been talking about allowing `params IEnumerable<T>` for many years but were concerned it would lure folks into a bit of a performance degradation. The method body would go through interface calls instead of easily optimizable direct calls on an array.
2
1
29
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@VisualStudio As always I'm more than happy to take credit for the great work of @mkristensen ! ๐Ÿ˜ƒ
1
0
26
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
9 years
Had great fun as @sethjuarez let me wave my hands for almost an hour on @ch9 about where we may take #csharp next: .
4
21
26
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
9 years
More on null checking in C# 7: Design notes and proposal on http://t.co/F92E0wj1Fk, issues #5031 , #5032 and #5033 . It's coming together!
2
29
27
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@dustinmoris We've also discussed allowing `params Span<T>`. That could actually lead to a performance improvement, since we could probably stack allocate the span and save heap allocation of the array. This has another pitfall, though, in that the stack may grow rather more quickly.
1
0
25
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
I'll be stopping by the .NET User Groups in Auckland, Wellington and Christchurch. Different talk than at #Codemania , so do come to both!
2
8
24
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
3 years
@davidfowl @bryanl I think we'll try to get more serious about promoting a more curated "modern C#" feature set, in tooling, samples and docs. @billwagner is looking into that. It's the best we can do when actually deprecating features will break millions of lines of source code.
5
2
24
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@noopman @jguadagno @refreshingidea @mcbeniwal @jprosise @realDotNetDave @billjwolff @CsharpCorner I'm in a car in Delhi, on my way to the market, still having fun. Flying out tonight. Miss you guys!
5
5
21
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
I nearly forgot how much fun it is to hang out with Erik. No better way to spend a Friday morning! ๐Ÿ˜๐Ÿคฏ
@yow_conf
YOW! Conferences
4 years
Our double-length YOW!Tube session with @headinthebox & @MadsTorgersen is today! Dive into the history & trends of programming languages, as well as got bonus insights into their personal libraries w/a show-and-tell of treasured books. Don't miss it!
Tweet media one
1
3
13
2
2
21
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
@jamie_dixon @NumberByColors Yeah, I'm trying to add all F#'s features to C#, but I just can't keep up...
3
14
21
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
3 years
Great initiative, @realDotNetDave ! I've donated $250. Thanks to @CsharpCorner for bringing developers across the world together to help India in this calamity! @RockinCodeWorld
@realDotNetDave
David McCarter (Microsoft MVP)
3 years
India really needs our to help them get through the #COVID -19 wave they are having. I donated $100 and I CHALLENGE ALL in the software tech world to match my donation or give more. Please RT to spread the word and post your donation. @csharpliveshow
0
12
8
0
12
20
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@KirillOsenkov @jaredpar @jnm236 Recursive patterns in C# 8.0 will allow the empty property pattern '{}' as a special case. If you say 'x is {}' it does nothing but check that x is not null. I think of it as "x is an object". I kind of like it, now that I've gotten used to it.
3
5
19
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
10 years
More C# features implemented in CTP3: nameof operator and expression-bodied methods + other functions. Start at
1
29
18
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@andygocke Ambiguous Something Tree
0
0
18
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@MrMatthewLayton Thanks, this is a super interesting discussion! We definitely made mistakes along the way in C#, and with 20+ years' worth of evolution, there are some warts new features have to work around to maintain compatibility. /1
4
1
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
10 years
What a fantastic #MVPSummit ! Great feedback on #Roslyn and #csharp 6. Can't wait to design C# 7 in the open with you guys. Thanks! #mvpbuzz
4
18
16
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Move along platform, please! ๐Ÿ˜€
@codewithsimon
Stephen SIMON
6 years
Tweet media one
0
0
2
0
6
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Maybe check out the last four minutes or so of my "talking head" video, where I plug the nullables and explain the basics.
2
12
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
Really looking forward to being part of this!
@cphdotnet
CPH .Net Usergroup
5 years
We are excited to announce "Half a day of .NET" taking place on October 3rd at the Royal Library in Copenhagen. 4 talks from 4 awesome speakers ... read more on We are celebrating 3000+ members in #CNUG with support from @SiteimproveLife #dotnet #cphftw
1
6
11
1
2
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
Uh oh, ominous! ๐Ÿ˜ฌ
@codewithsimon
Stephen SIMON
6 years
Tweet media one
0
1
3
0
5
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
Freedom is won, but justice eludes us. May hope and courage find you today! Happy Juneteenth!
0
6
17
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@davidfowl @terrajobst @mortenmertner Thanks! Love it! The motivation section reads like something we would have written ten years ago when we had to convince our management and community that this was a good idea. ๐Ÿ˜€ I'm really happy the industry is standardizing on one approach to async. It's a transferable skill!
1
1
16
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
@SamRueby @terrajobst @jaredpar .NET Framework 4.8 implements .NET Standard 2.0 and does not contain the .NET Standard 2.1 libraries and runtime behavior necessary for some of the C# 8.0 features. For more details, see the "Platform dependencies" section of this post:
2
9
15
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
How to check out Azure. In case you didn't pick up on that little detail, you can do it for FREE! ๐Ÿ˜€
@ThatVBGuy
Anthony D. Green
7 years
"What can Azure do for me? Do I need it? How do I find out? Will it help my business? Can it help my career?"
0
12
25
2
8
15
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@praeclarum We're definitely looking at `var?`. I even put it in my spec.
1
4
15
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
This is heartbreaking. The trauma of unrecognized neurodiversity in childhood can be crushing.
@The_Weed
Josh Weed
2 years
The level trauma of being a neurodivergent person raised in an ableist world is absolutely underestimated. Many of the clients I encounter have levels of trauma that could qualify them for a diagnosis of PTSD. We need to reframe this completely. /1
181
3K
12K
2
4
13
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@tannergooding @fquednau @davidfowl We're absolutely planning to keep it!
1
0
15
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@jmezach @dotnet That's the plan, yes. If "your friend" does something cool with them, please let me know, and tag @jaredpar as well! We're always curious to hear how these things get used, and what brick walls folks slam into that we can work on demolishing next.
2
1
15
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
@gezzahead I hope not! Personally I believe that more functional features in #csharp make more people want to try the real thing in #fsharp !
3
17
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@onovotny @JamesChaldecott @lakritzator @VisualStudio We won't add anything without you asking. We are contemplating a very lightweight way of asking though. Say you can add a `!` after the name of a parameter, as in "void M(string s!)", and that causes a check to be generated into your method that throws if s is null.
1
0
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
9 years
Love to see our C #7 feature prototypes coming together. Great work @gafter on the pattern matching implementation shown at #Connect2015 .
3
10
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
2 years
@davidfowl @jaredpar @jcouv It's a treat to work with you David! You help us at the same time be adventurous and grounded in reality!
0
0
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
"The arc of the moral universe is long, but it bends toward justice." So said MLK, and I am clinging to that. But man is it long!
0
0
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
6 years
@terrajobst @mpodonyi Also classes cannot inherit from interfaces, only implement them.
1
0
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@Tyrrrz Good thoughts. Some FP features are essential or highly useful in the cloud and devices world that we now live in. We do our best to add them seamlessly to C# and make them first class. That said, if you want the full functional experience, F# is a great choice!
1
1
14
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
5 years
@GerjanDev @jaredpar @billwagner It composes better. Assume a is a complex expression. In the `switch (a) { ... }` syntax the `switch` and the `{ ... }` would get separated by that complex expression. With `a switch { ... }` you can fluently compute something, then switch on it.
2
0
13
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
Uh-oh, here I go again...
0
1
11
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
3 years
@unknown6656 @jaredpar Discriminated unions are not going to make C# 10. Records need a little more time to play out before I think we're ready to make some of the core decisions around discriminated unions. They are still very much on the radar though!
3
0
13
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
8 years
@dotnet @saucehammer Because our type inference algorithm is a little too dumb. We want to fix it, but never got around to it.
0
3
13
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
10 years
Posted new design notes and an updated version of "Upcoming Features in C#" over on CodePlex:
4
16
13
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@richcampbell My life in a nutshell
2
0
12
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
4 years
@Cypressious @Hamed__Fathi @dotnet Records are planned as the biggest new feature set of C# 9.0.
0
1
12
@MadsTorgersen
Mads Torgersen #BlackLivesMatter
7 years
I am officially in Christchurch! Looking forward to meeting everyone in a couple of hours.
@dwcCBSL
David Carter
7 years
Hey ChCh! We have @MadsTorgersen who is responsible for c# at @Microsoft talking on Wed. Don't miss this one!
0
4
6
2
1
12