C# 11 - Generic Math(s)

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 17

  • @CodingTutorialsAreGo
    @CodingTutorialsAreGo  Год назад

    Which features of C# 11 are you most interested in? Let me know in the comments.
    Source code available at: github.com/JasperKent/Generic-Maths
    Remember to subscribe at ruclips.net/channel/UCqWQzlUDdllnLmtgfSgYTCA
    And if you liked the video, click the 👍.

  • @demarcorr
    @demarcorr Год назад +3

    i took a 2year hiatus from dev, got back in about a month ago and now we can define static abstract members in interfaces. What a time to be alive. I love these new features

  • @codingbloke
    @codingbloke 6 месяцев назад +1

    Wow! More than a year on since C#11 and I did not know about this feature. Really well explained thank you!

  • @jimpaloander1888
    @jimpaloander1888 6 месяцев назад +1

    1. They have to introduce vector math on arrays. Overloading operators +,*,-,/ create temporary objects. These in turn for long expressions and large vectors occupy as much extra memory as the number of extra temporaries. Fortran has it since decades ago, Zig has introduced it by scratch; it is unreasonable in 2024 C# not introducing vector math operations on arrays.
    2. They should introduce a type for automatic differentiation (AD) build in the language so that 1st and 2nd order derivatives can be computed on the fly.
    3. They have to introduce a feature for compile time code execution similar to Zig.

  • @Rhysling2
    @Rhysling2 Год назад +1

    Brilliantly clear. Thank you!

  • @haroldpepete
    @haroldpepete Год назад +1

    nice tip, thank sr by share with us your knowledge

  • @krccmsitp2884
    @krccmsitp2884 Год назад +1

    Interesting and helpful roundup!

  • @RiversJ
    @RiversJ Год назад +1

    I can't believe these weren't a thing earlier and even worse i can't use them yet where i need them 😃

  • @marklord7614
    @marklord7614 Год назад +1

    Nice video. Thank you sir.

  • @williamliu8985
    @williamliu8985 Год назад +2

    Can I say the static abstract method in interface is designed to abstract the static member out of class?

  • @mihaiga
    @mihaiga Год назад

    Maybe it is a problem of commutativity when summing over unordered lists. In this case, the sum is not deterministic.

    • @CodingTutorialsAreGo
      @CodingTutorialsAreGo  Год назад

      Not sure what you mean.

    • @mihaiga
      @mihaiga Год назад

      @@CodingTutorialsAreGo commutativity means that A+B = B+A so if the sum is over (A,B,C) then it may give a different result than over (A,C,B). My assumption is a stretch, I don't believe that Microsoft was considering abstract algebra in this case. Thank you for your videos, they are very informative and to-the-point. I wish to see this channel grow and I will recommend it to my colleagues.

    • @CodingTutorialsAreGo
      @CodingTutorialsAreGo  Год назад

      @@mihaiga I know what commutative means, but addition is also associative, i.e. (a + b) + c == a + (b + c). Therefore, order of summation does not make any difference.

    • @haroldpepete
      @haroldpepete Год назад

      that makes no sense, 2+3+5 is the same that 5+2+3 and the same as 3+5+2, whatever the order you use at the same element, sum is the same