What's next in C# - Mads Torgersen - NDC Sydney 2024
ฝัง
- เผยแพร่เมื่อ 21 มิ.ย. 2024
- This talk was recorded at NDC Sydney in Sydney, Australia. #ndcsydney #ndcconferences #developer #softwaredeveloper
Attend the next NDC conference near you:
ndcconferences.com
ndcsydney.com/
Subscribe to our TH-cam channel and learn every day:
/ @NDC
Follow our Social Media!
/ ndcconferences
/ ndc_conferences
/ ndc_conferences
#csharp #dotnet #language
For nearly a quarter century, C# has leaned into evolution and innovation, adapting pragmatically to shifts in the software landscape and improvements in the state of the art. Along the years C# has become cross-platform and open source, supplemented its object-oriented core with a generous helping of functional-language features, and simplified its syntax to a point where modern code would be barely recognizable as C# to an early-2000's developer.
Where is C# at today? What have we learned from the journey, and how should we proceed from here? Where should C# go next? Take a look over the horizon with Mads as we check in on features that are still in the works, and how they fit in the bigger picture. - วิทยาศาสตร์และเทคโนโลยี
Yes, YRS! Can we PLEASE unions or at-least sealed class hierarchies (like java)? With support for exhaustion check in switch?
Could define a variant of sealed that can only be extended by nested classes, which is a relatively small change, and the outcome is that the example declaration looks and works almost like an enum, and if you want to make the variant definitions larger you can just use a partial class to define each nested class in its own file.
i would ideally prefer F# like syntax. the sealed interface from Java is a bit dirty. but given 10+ years of wait, even a slightly dirty syntax is fine for now - please, please just sacrifice one NDC talk (2 weeks), that will surely be enough for likes of Mads to add this feature.
The proper blending of typed union and descriminated union for C# would be amazing - that means C# developers will enjoy the both worlds of the union. 🎉
I want union type to be first citizen. That is something I really love in TS
Can't wait to work with C#13
Ah, this must be that "talk from yesterday"!
I've been reading Mads' and other's works on the expression problem in the early 2000s. Looking forward to if you can make it in C# with the extensions. That would be awesome.
Great language ... thanks!
Implementing interfaces on behalf of another type. A lot of pitfalls with this, but it would basically work like type classes which are fantastic
how about finally making enums convertable to json as strings out of the box?
a) It is not a language, but rather a BCL feature
b) It is already implemented, search for JsonStringEnumConverter
System.Text.Json has a built-in converter for that. It's just not the default.
@@michaldivismusic but it doesn't convert to string that doesn't match the enum property spelling
@@konstsh2240 that doesn't sound like something I'd want anyway. What do you mean exactly? That "firstname" or "firstName" won't match if the enum value is "FirstName"?
@@michaldivismusic For example when json field might have a fixed number of string values like "Reference::Point", "Reference::Edge", "Dimension::PointToPoint" and a number of others and you want to parse them into enum Annotation{REFERENCE_POINT, REFERENCE_EDGE, DIMENSION_POINT_TO_POINT} - the the real case of json response I'm dealing with on current project and turned I had to look for side package
Aspnetcore results feels pretty hacky. A proper union type would be nice.
20:50 sounds like a spooky action at a distance. I'd just make the default type an array or a list and call it a day. if you need something more specific, specify the type. if you don't, is an array. or a list.
The most important change I want for csharp is likely not going to happen. I want full type inference. It would be so incredible.
cant we just replace chsarp with fsharp already
@@z0nx I approve this message. Ok, the people have spoken, get on it Microsoft. Good talk, good run csharp team, you can pack it in, we will functionally take it from here, kthxbai. lol. how I wish it were so.
[ ] >> { } for collection expressions! Coming from an #fsharper :)
Is there a reason other than convention that C# is mostly double-spaced?
Its so funny how he goes out of his way not to say the word "Java" when talking about the initial design of C#
Yeah... we're not getting type classes, are we?
what to do when u have not much to say…. ramble ramble ramble