Our favorite things in .NET 8 - David Fowler & Damian Edwards - NDC Sydney 2024

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • This talk was recorded at NDC Sydney in Sydney, Australia. #ndcsydney #ndcconferences #developer #softwaredeveloper
    Attend the next NDC conference near you:
    ndcconferences...
    ndcsydney.com/
    Subscribe to our TH-cam channel and learn every day:
    / ‪@NDC‬
    Follow our Social Media!
    / ndcconferences
    / ndc_conferences
    / ndc_conferences
    #dotnet
    In this session, Distinguished Engineer David Fowler and .NET Product Architect Damian Edwards share their favorite things about the newly released .NET 8, including some items you probably haven’t heard about.

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

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

    Title is wrong, it's David Fowler, not Damian Fowler 😊

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

      I like the idea they've done so many talks together they are just "Damian Fowler" now 😄

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

      I hope “Scott Toub” becomes a thing.

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

    Turn off copilot next time. Ruins the presentation

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

      no it doesn't. It shows real life usage of copilot...

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

      ​@@codder32this isn't a copilot talk

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

      @@jamesl5149 this isn't a visual studio talk maybe he should go in notepad. Wait this isn't a notepad talk...
      Tools are tools, it's a tool a lot of people use with C#, its related

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

      @@codder32 not everyone uses Copliot

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

      ​@@alfflasymphonyxnot everyone uses visual studio and no one's crying that they're pushing VS?
      Not everyone is on windows, maybe we should ask them to program in notepad to make everyone happy?

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

    Default for "var x = []" should be list. Never in my life have I wanted an easier way to create an empty array except when passing as a parameter. What would it's use case be?

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

      That makes sense. But what about "var = [5]"? You could argue it should be an array. But then you get a list when it's empty and an array when it's not? That doesn't make sense.

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

      Very valid point if consumers of the syntax are using it as a shorthand for existing types. Also Agreed that would be unexpected unless it’s defined behavior.
      Consider whether the compiler can infer the best type based on how it’s used in the same way it does when the left hand side is defined.
      If I mutate, give me the best mutable type. If I don’t, the best non-mutable. If I return it as a span, consider that. Or if I return an IEnumerable, please do the best there.
      When I see the syntax it kind of kicks me into a more dynamic context. We have anonymous objects, anonymous methods, lambda expressions which generate expression trees (not IL methods), and now we even have anonymous delegates with default parameters.
      Could this syntax be anonymous collections? Basically says “I don’t care about the underlying type, please use or create the best one that fulfills my needs based on local usage”. I say local because this syntax in a field or property wouldn’t work if it was anonymous and I think that’s ok.

  • @mohamedmurshid9794
    @mohamedmurshid9794 27 วันที่ผ่านมา

    anyone know what is the light theme he is using?

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

    what's the point of private fields in your can change their values via reflection.
    Getting a list of private fields, I'm ok with this but we should not be allowed to change their values.

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

    I'm old enough to remember when constructor injection was considered bad.

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

      What was considered best practice at that point? Method parameter injection?

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

      @@modernkennnern probably property injection. tons of cargo cult bad/good that doesn't really matter

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

      @@modernkennnern property injection. You always had factory or strategies to construct your objects and stitch things together. Constructor injection to my mind simplifies things. And you can hold a reference to IServiceProvider to do other resolutions as you need them.

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

      @@alexisfibonacci You can hold a reference to IServiceProvider but you almost never should. 🙂 Instead, you should pass in a more specific factory, if you can. Otherwise, it's no longer possible to see which types a type depends on -- it can create whatever it likes with the IServiceProvider. Sometimes you need this, like when you're instantiating plugins from a configuration but it's rare.
      To the OP, I don't know why constructor injection would be considered bad. It allows you to see a type's dependencies and reason about your code more easily. If a type has everything it will ever have when it's constructed, then there are far fewer code paths to consider.
      There are always exceptions, of course, but the general direction should be to inject simple types (i.e., not IServiceProvider) in the constructor ... and make properties read-only. 🙂

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

    26:40 a docker container uses a system kernel and it uses system clock, so it wouldn't work anyways. you need a vm. or just run all tests in serial and modify system clock every time

  • @catfishfortesque-smythe437
    @catfishfortesque-smythe437 2 หลายเดือนก่อน +1

    What's with all the silly noises?
    Unwatchable.