A Very Elegant Way to Write C# Code - Switch Expressions

แชร์
ฝัง

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

  • @mfsbo
    @mfsbo หลายเดือนก่อน +5

    Readability of code that human writes is far more important to converting it for machines. Thanks for sharing what is offered but its like spreading the butter with your folk lifter is not needed but can be done.

    • @MilanJovanovicTech
      @MilanJovanovicTech  หลายเดือนก่อน

      "spreading the butter with your folk lifter" 😂

  • @WDGKuurama
    @WDGKuurama หลายเดือนก่อน +3

    Noooo, it just needed the one liner func syntax with '=>' at the second line to be perfect 😢

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

    While switch expressions does make code more consice, it comes with readability price.

  • @norlyssuarezvalderrama5330
    @norlyssuarezvalderrama5330 หลายเดือนก่อน

    Great 👍

  • @YehorBachurinDev
    @YehorBachurinDev หลายเดือนก่อน +1

    👍

  • @Claucker7
    @Claucker7 หลายเดือนก่อน +3

    not readable

  • @vijayarajan-bt5fk
    @vijayarajan-bt5fk หลายเดือนก่อน

    Why _F only for f finally??

  • @rikudouensof
    @rikudouensof หลายเดือนก่อน +7

    I would not advice this. Codes should be readable for the future people

    • @JollyGiant19
      @JollyGiant19 หลายเดือนก่อน +5

      But this is readable

    • @rikudouensof
      @rikudouensof หลายเดือนก่อน +3

      @@JollyGiant19 my take is that code should be in a way that junior devs or intern devs can understand

    • @ryan-heath
      @ryan-heath หลายเดือนก่อน +3

      Future people would thank you when you don’t use (then) outdated constructs. 😉

    • @WDGKuurama
      @WDGKuurama หลายเดือนก่อน +2

      Not using new syntax while lew devs will most likely use them because you think it wouldn't be readable sounds very wrong. Especially with such a simple and common pattern.
      It just looks that way on a lot of other languages, especially more on functional programming ones.

    • @rikudouensof
      @rikudouensof หลายเดือนก่อน

      @@WDGKuurama it alswys starts with the simple patterns untill someone cooks technical dept