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.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 32

  • @MagicNumberArg
    @MagicNumberArg 13 วันที่ผ่านมา +28

    Yes, YRS! Can we PLEASE unions or at-least sealed class hierarchies (like java)? With support for exhaustion check in switch?

    • @tacticalassaultanteater9678
      @tacticalassaultanteater9678 12 วันที่ผ่านมา

      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.

    • @ks1970in
      @ks1970in 12 วันที่ผ่านมา +1

      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.

  • @obinnaokafor6252
    @obinnaokafor6252 12 วันที่ผ่านมา +10

    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. 🎉

  • @vmachacek
    @vmachacek 11 วันที่ผ่านมา +4

    I want union type to be first citizen. That is something I really love in TS

  • @guiorgy
    @guiorgy 13 วันที่ผ่านมา +5

    Can't wait to work with C#13

  • @michaldivismusic
    @michaldivismusic 13 วันที่ผ่านมา +4

    Ah, this must be that "talk from yesterday"!

  • @zwatotem
    @zwatotem 4 วันที่ผ่านมา

    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.

  • @tariqpahmed
    @tariqpahmed 5 วันที่ผ่านมา

    Great language ... thanks!

  • @julkiewicz
    @julkiewicz 2 วันที่ผ่านมา

    Implementing interfaces on behalf of another type. A lot of pitfalls with this, but it would basically work like type classes which are fantastic

  • @konstsh2240
    @konstsh2240 13 วันที่ผ่านมา +4

    how about finally making enums convertable to json as strings out of the box?

    • @DoctorKrolic
      @DoctorKrolic 13 วันที่ผ่านมา

      a) It is not a language, but rather a BCL feature
      b) It is already implemented, search for JsonStringEnumConverter

    • @michaldivismusic
      @michaldivismusic 13 วันที่ผ่านมา +4

      System.Text.Json has a built-in converter for that. It's just not the default.

    • @konstsh2240
      @konstsh2240 13 วันที่ผ่านมา +1

      @@michaldivismusic but it doesn't convert to string that doesn't match the enum property spelling

    • @michaldivismusic
      @michaldivismusic 13 วันที่ผ่านมา

      @@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"?

    • @konstsh2240
      @konstsh2240 13 วันที่ผ่านมา

      @@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

  • @weifengmao
    @weifengmao 11 วันที่ผ่านมา +1

    Aspnetcore results feels pretty hacky. A proper union type would be nice.

  • @Kitulous
    @Kitulous 8 วันที่ผ่านมา

    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.

  • @WillEhrendreich
    @WillEhrendreich 13 วันที่ผ่านมา +1

    The most important change I want for csharp is likely not going to happen. I want full type inference. It would be so incredible.

    • @z0nx
      @z0nx 7 วันที่ผ่านมา +1

      cant we just replace chsarp with fsharp already

    • @WillEhrendreich
      @WillEhrendreich 7 วันที่ผ่านมา

      @@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.

  • @TheOneAnOnlyGuy
    @TheOneAnOnlyGuy 10 วันที่ผ่านมา

    [ ] >> { } for collection expressions! Coming from an #fsharper :)

  • @fburton8
    @fburton8 11 วันที่ผ่านมา

    Is there a reason other than convention that C# is mostly double-spaced?

  • @Avantarius
    @Avantarius 12 วันที่ผ่านมา

    Its so funny how he goes out of his way not to say the word "Java" when talking about the initial design of C#

  • @lime148
    @lime148 12 วันที่ผ่านมา

    Yeah... we're not getting type classes, are we?

  • @Alperic27
    @Alperic27 11 วันที่ผ่านมา

    what to do when u have not much to say…. ramble ramble ramble