What's new in C# 10

Поділитися
Вставка
  • Опубліковано 17 січ 2025

КОМЕНТАРІ • 84

  • @MajeureX
    @MajeureX 3 роки тому +156

    Here's the list of new features covered in the video!
    0:48 Record structs and with expressions
    4:15 Anonymous types
    4:50 Custom parameterless constructor for structs
    6:50 Field and property initializers for structs
    7:53 File-scoped namespace declaration
    10:05 Global using directives
    12:09 Implicit using directives
    14:28 Lambda improvements
    21:12 Type inference for lambdas and method groups
    22:50 Interpolated strings performance optimizations

    • @lnk77
      @lnk77 3 роки тому +6

      thank you, the clip is a nightmare, just a long story of BLA

    • @jcespinoza
      @jcespinoza 3 роки тому +1

      Thanks a lot, hero!

    • @JorgeEscobarMX
      @JorgeEscobarMX 3 роки тому +1

      You deserve a medal man

    • @ivcbusinesssystems6613
      @ivcbusinesssystems6613 3 роки тому +1

      This is VERY helpful!!!
      I have no idea who green lit this rambling, but they need to stop and lay things out like you have!

  • @Lollertube82
    @Lollertube82 3 роки тому +32

    These two old programmers are a pleasure to listen. They have that thing about them that says, yeah, been there, done that, and now they are just having fun with the thing they do.

    • @sylvainr0
      @sylvainr0 3 роки тому +3

      They look young to me :)

  • @RubenHeerenDev
    @RubenHeerenDev 3 роки тому +8

    *I love C#*. You guys take great features from other languages and implement them in a clean way.

  • @keja0
    @keja0 3 роки тому +6

    Every time when converting to block-scoped namespace and the indentation jumps a level back my heart jumps as well. Love it! ❤️

  • @FurryDanOriginal
    @FurryDanOriginal 3 роки тому +17

    I love the direction C# is heading. Definitely my cup of tea. Great work!

  • @Raizin-d8p
    @Raizin-d8p 3 роки тому +23

    Chapters or timestamps would help a lot.

  • @TS-yf8hq
    @TS-yf8hq 3 роки тому +1

    Dotnet conf is my new Super Bowl! Cheers

  • @okerror1451
    @okerror1451 3 роки тому +8

    Really cool and in-depth stuff guys. Thanks!

  • @mikhailnikitin1697
    @mikhailnikitin1697 3 роки тому +7

    Would be so much better if when the code is changed by the speaker, the screen shows that code and not the speaker looking into a screen which we can't see...

  • @IIARROWS
    @IIARROWS 3 роки тому +5

    Jokes on you: I never put 4 spaces at the beginning of my files lines. I use 1 tab.
    Like every non-psychopath developer.

  • @steefen5281
    @steefen5281 3 роки тому +3

    Thanks for all the great videos!

  • @yetanotherdex
    @yetanotherdex 3 роки тому +4

    when do we get file-level classes?

  • @r1pfake521
    @r1pfake521 3 роки тому +4

    What happend to static interface methods and generic math improvements? :(

  • @satheeshan
    @satheeshan 2 роки тому

    Nice intro into some of the new features

  • @mwimb6716
    @mwimb6716 3 роки тому +1

    wow, these guys really did some great work on the language didnt they!

  • @OttoAkama
    @OttoAkama 3 роки тому +6

    Demo Driven Design 😎

    • @bobweiram6321
      @bobweiram6321 3 роки тому +1

      LOL! So far all the "new features" offer very little to no value to me. They merely reduce the amount of typing required. I never heard anyone complain about Using statements as being too verbose or taking too much screen space, nor has anyone wished the compiler could infer types better. What I wish C# had was support for algebraic types, which are very powerful and would definitely enhance the development process.

    • @RenegadeVile
      @RenegadeVile 3 роки тому +3

      @@bobweiram6321 It might not be groundbreaking, but it's still handy stuff. Not sure what the big deal is.

  • @philippelhaus
    @philippelhaus 3 роки тому +2

    Man i love c#

  • @egonknapen4079
    @egonknapen4079 3 роки тому +1

    I have a 28" 16:9 monitor, 4K (because 16:10 or 3:4 isn't really an option anymore. If I make my visual studio fullscreen most of the time half the editor window on the right side of my code is white and empty. And you guys are complaining about removing those few idents on the left side...
    And then you guys are complaining about vertical space, a few usings in the beginning. Half the foreign projects I see have like a big comments section on top, and default installation and yours too, add a line of 'reference' to every line.
    Talking about priorities...

  • @vuhoangdung
    @vuhoangdung 3 роки тому +3

    some features are copied from F# which is a good thing

  • @jasarwadlow9406
    @jasarwadlow9406 3 роки тому +8

    Just my 2 cents, but i really dislike the camera work here. The constant jumping from code to presenters to different angles of them to zoomed out panning shots.
    Maybe I'm just old, but that was distracting af, and I could barely read and appreciate the code without pausing every few seconds.
    I also dislike the presentation style of some of the other presenters.
    Especially the ones on the Minimal API talk. Cringey and full of fluff.
    At least these two are coherent and somewhat straight-to-the-point

    • @bobmcbob4399
      @bobmcbob4399 3 роки тому

      And that animated background with the space ship flying about on loop

  • @nanvlad
    @nanvlad 3 роки тому

    what' the problem to simplify delegate even more? Let's say var a = => 3 : 4; is it obvious that is Func a = (b) => b ? 3 : 4; ? Or to be more precise let's write var a = _ => ? 3 : 4; What do you think?

  • @ZintomV1
    @ZintomV1 3 роки тому

    08:24 - The programming meta in 2022 for sure

  • @tubeashu
    @tubeashu 2 роки тому

    #dotNET what do you recommend, if we are using global using and we have say many projects/files and only one project/file have namespace conflict. How we can handle such scenario ? Should conflicted namespace be added explicitly in each project/file or is there a way to resolve conflict in conflicted file itself.

  • @fredchuks7822
    @fredchuks7822 2 роки тому

    How do I call methods in c sharp 10

  • @3wsystems663
    @3wsystems663 3 роки тому

    a good online code c# 10 manual??

  • @leandrocasas90
    @leandrocasas90 3 роки тому

    We just gained some serious real state in our code files.

  • @GAURAVGUPTAER
    @GAURAVGUPTAER 3 роки тому

    Thanks

  • @SynthacticSugar
    @SynthacticSugar 3 роки тому +11

    Thanks for all the good stuff you have brought to the language during its development! I have been using it since it's release for almost 20 years now! But these small alternative ways of writing things that was already simple enough is not very helpful in my opinion. As a developer I strongly favor consistency over slightly less verbose alternatives. I wish you could focus more on fewer features that really makes a difference in what we can do. There are many more doors to open!

    • @Andrew-es6yt
      @Andrew-es6yt 3 роки тому +1

      As a developer, I favor brevity and simpicity. And also I want C# to stay competitive. They are doing the right thing.

  • @doctor9101
    @doctor9101 3 роки тому

    Can we have anonymous classes derive from another class

  • @YBXtreminal
    @YBXtreminal 3 роки тому

    How you do the arrow symbol (⇒) insted of =>?

    • @ecblanco
      @ecblanco 3 роки тому +1

      It's because of the font. They are the same, but because of the font looks like an actual arrow.

    • @WildPork
      @WildPork 3 роки тому

      try "Cascadia Code" font

  • @kalleguld
    @kalleguld 3 роки тому

    But how about record interfaces? and record enums? :)

    • @falsemotive
      @falsemotive 3 роки тому

      Should be able to use an interface,right?

  • @jackwu9613
    @jackwu9613 3 роки тому

    What font does he use?

  • @kevinn1729
    @kevinn1729 2 роки тому

    My first love

  • @tuberklz
    @tuberklz 3 роки тому

    "maybe" already

  • @paulward8087
    @paulward8087 3 роки тому +1

    I still don't get the point to records.
    Am I alone with this?

    • @keithpatrick156
      @keithpatrick156 3 роки тому +2

      I don't either. I'm not seeing why they don't just roll that functionality directly into the type system rather than add a new "thing" that can be either a class or a struct.

    • @paulward8087
      @paulward8087 3 роки тому

      @@keithpatrick156 at this point a record is basically just a normal class anyway ... The only thing that's changing is how they are used in code.
      Are they doing something different in the compiler or how the memory is allocated?

  • @hongyuan
    @hongyuan 3 роки тому

    I would like to see the intelliSense to appear again when I use backspace to modify in C# -- just as it is in VB.

  • @treyquattro
    @treyquattro 3 роки тому +1

    those of us who have been around remember record and with in Pascal

  • @ZintomV1
    @ZintomV1 3 роки тому

    I think this mollycoddle approach for new C# programmers will really bite the community in the butt later down the line.

  • @lcfb2009
    @lcfb2009 3 роки тому

    Someone can answer about c# performance? Which language has better performance: Java or C#?

    • @psdmaniac
      @psdmaniac 3 роки тому +1

      do not troll

    • @lcfb2009
      @lcfb2009 3 роки тому

      @@psdmaniac it is not a troll. Is there a comparative benchmark anywhere? I want to migrate a project from Java to C#.

    • @psdmaniac
      @psdmaniac 3 роки тому +1

      @@lcfb2009 6:20 => ua-cam.com/video/AFNujHJfMtU/v-deo.html

  • @christianmontagx8461
    @christianmontagx8461 3 роки тому +6

    C# Becomes more and more VB. It supports more and more bad coding behaviours. If you need static initializers for a struct use a factory, not a struct-constructor.

  • @masoodahmed4718
    @masoodahmed4718 3 роки тому +6

    Ok here is a joke for you.
    Why do java developers wear glasses?
    because they see sharp enough not to bring in every other kind of programming paradigm in one language.
    get it? No?
    ok I will see my self out.

  • @deanrettig7791
    @deanrettig7791 3 роки тому +2

    If MS is really interested in reclaiming vertical space, they should consider defaulting opening braces to the end of the previous line.

  • @michaelderamus662
    @michaelderamus662 3 роки тому

    Microsoft pays people to promote C#?

  • @swordblaster2596
    @swordblaster2596 2 роки тому

    Making syntax less clear in the name of "reducing code" is the surefire way to tell a language is on path to hell

    • @_Mentat
      @_Mentat 2 роки тому

      I agree. It becomes cultish and only the cognoscenti understand it; and they love that of course. Meanwhile industry needs maintainable code where there is only _one_ way to skin any given cat. If there are two ways to write some code then one of them is wrong and shouldn't be in the language.

  • @jubinjacob3951
    @jubinjacob3951 2 роки тому

    instead of destroying the language syntax . focus on performance and improvements . everybody used to love c# because most of them loved the beautiful java like syntax , now it's all gone , I hate c# now ,

  • @DrawTheLine2
    @DrawTheLine2 3 роки тому +1

    Thanks for using DARK MODE - next time. My eyes are destroyed.

    • @DrawTheLine2
      @DrawTheLine2 3 роки тому +2

      @Daniel Prokhorov Your reply is very stupid. My comment would make a future video better. Yours??? Also, I wanna see who is the cry baby me or you: let's meet and say this to me face to face. C'mon, I can deal with your low level kind, np!

  • @pavelsvec5073
    @pavelsvec5073 3 роки тому +13

    Killing the language goes on.

    • @RenegadeVile
      @RenegadeVile 3 роки тому +9

      How so?

    • @bobweiram6321
      @bobweiram6321 3 роки тому +10

      @@RenegadeVile Lot's of frivolous code reduction features and no real improvements in c#'s expressiveness. I've never heard anyone complain about Using or namespace statements statements as being particularly verbose. Parameterized strings, on the other hand, has been a god send feature and enhances the developer experience. I would be more excited if they supported algebraic types like F# and Swift as it would improve code quality.

    • @RenegadeVile
      @RenegadeVile 3 роки тому +5

      @@bobweiram6321 Whether true or not, that is not killing the language. This guy said they are killing the language and I want to hear from HIM, why he thinks that.

    • @jmoralesv03
      @jmoralesv03 3 роки тому

      ​@@RenegadeVile I don't know we will get an answer from Pavel Svec anytime soon, let's wait and see. Please like this comment when that happens.

    • @EspenSkaufel
      @EspenSkaufel 3 роки тому +3

      @@bobweiram6321 I'm afraid I have to disagree. If you have not heard anyone complain about the verbosity of C# perhaps you have not been listening?