Every feature added in C# 10 with examples

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 168

  • @nickchapsas
    @nickchapsas  3 роки тому +37

    Thank you so much everyone for pointing out usecases for static abstract members in interfaces. No idea how I missed it, since it's quite obvious but I'm so glad you could give me a hand wiht this one!

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

      Async method builder allows to specify how to configure the state machine of the async method behind the scenes. Look at Microsoft's RC post - they show an example where they pool the task instances and improve the performance.
      About static members in interfaces - a lot of code in functional programming is repeated because there is no way to look at the shape of the type - including static members.
      Implementing map, reduce and filter is a great example, because the implementation of map on a collection, and on tasks, and async enumerables and option and more are pretty much the same, and the duplicate code can be totally eliminated with abstract members in interfaces.
      I recommend you look it up.
      Great video! I'm supper excited to use this in my own projects!!

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

      The lambda with var = null causes an error because var could be a bool as there isnt a type to clarify to the compiler and bools can't be null they are binary. so by clarifyhing string before the lambda your telling that Var represents a string and only a string. Though honestly var should probably not be used as it leads to hard to read code the exception is where the type is clear such as var counter = 1 in this case its easy to tell its an int.

  • @Krzysztof20031997
    @Krzysztof20031997 3 роки тому +18

    I love it that you if you don't know a mechanism you just say "I don't know it, but just wanted to tell you that something will be changed."! Thank you for presenting C# 10 features in this nutshell :)

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

    I've been coding in Typescript only for the last 6 months, came here to check on my favortie language and your video made me keen to get back to C#

  • @RoughSubset
    @RoughSubset 3 роки тому +49

    Unless I've missed it in your videos, a video on Func and Action with practical use cases would also be great!

    • @nickchapsas
      @nickchapsas  3 роки тому +49

      I have a video exactly like that scheduled within the next 2 weeks

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

      @@nickchapsas Awesome, thank you!

    • @sallerc
      @sallerc Рік тому

      @@nickchapsas What is the name of the video? Couldn't find it when searching through you videos

  • @valcron-1000
    @valcron-1000 3 роки тому +43

    Static abstract members are Typeclasses from Haskell. When implementing an interface you need to extend from it in the class declaration (class X : Interface { }), but with this new feature you can extend classes which you don't control (like extension methods, but in a controlled manner). This goes WAY beyond "numerical" code.
    For example, a while ago I was working on an Android project that used the class "MediaMetadataRetriever". In order to use the "try-with-resources" construct, a class should implement the "AutoClosable" interface. The class didn't implement the interface until API 29. Even if the class conformed to the interface and I could recreate the behavior using it's public API the only option I had was to make a subclass that implements it. With Typeclasses I could easily extend the interface without needing to control the class implementation.
    I recommend watching this video from Mads Torgersen: ua-cam.com/video/hnu_EgFLO7g/v-deo.html

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

      Thanks. This was a great resource for learning about this feature!

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

      I'd simply describe it as "inheritance-free contracts for static members." I will use this all over the place when swapping implementations of functions that don't need an instance, such as a configuration driven "option" or a fake for testing.

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

      Thank you so much. If it wasn't for your comment, I wouldn't have realized that this is the very feature I was hoping, waiting and searching for since c# 4.0. Every now and then i would look at the feature list and hope they implement something close to the golang interface mechanism. Finally it is here. :D

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

      After I played around with this feature, I sadly have to report that it is not there yet. There is one key thing missing to resemble Typeclasses from Haskell or interfaces from golang. For now there is no way to link the interface to an existing class ( e.g. extension IntExt : Int32, INumber { } ).
      So back to square one for me :(. I hope it will not take another 5+ years to get implemented.

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

      @@ZipADeeeDoooDaaa Just curious, why can't you create a class and derive it from Int32? If you need a new method in that class, why not create an extension method?

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

    So happy about the static abstract members. This is something that has been bugging me for years. I have needed this feature many times and no language ever seemed to have it.
    Without this functionality, if you want a class family to have common fields with hardcoded values, but with different values for each subclass, you have to instantiate the class before you can access the hardcoded fields. Now you can just call it statically from the subclass. I feel like I often want this functionality when associating enums with subclasses. You can also enforce singletons in a class hierarchy with this.

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

    'AssAndDeclaration' from feature 9.
    You are a master of naming! )

  • @janbodnar7815
    @janbodnar7815 3 роки тому +25

    For me, the file scoped namespaces, global usings & lambda improvements are the greatest additions to the language. The only thing that Java language had better than C# was the package system; now with file scoped namespaces, I declare the Java language officially defeated. Everywhere, the C# syntax is now cleaner, shorter & more powerful. (Note that this is relevant to the Java as the language, the ecosystem has Clojure & Groovy languages which are both great.)

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

      and Java still doesn't have async / await in 2021

    • @11clocky
      @11clocky 2 роки тому

      Java has better enums, though.

    • @pemifo260
      @pemifo260 Рік тому

      @@11clocky who uses enums?

    • @11clocky
      @11clocky Рік тому

      @@pemifo260 I use them all the time. They are much better at representing a state than an int.

    • @pemifo260
      @pemifo260 Рік тому

      @@11clocky can you provide some examples? yes i agree with you enums represent states better than int but in my codes i don't represent states that much (likely never to rare.)

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

    So I subscribed to many UA-camrs... You are the first one who got the Notificaton Bell... Great work! A ton of useful information in a short amount of time.

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

    The abstract members in an interface, I was just wishing the other day I could do that in a game I have been working on. Nice to see that I will soon be able to. 👍

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

    Been waiting on generic attributes for sometime; good to see it implemented, now hoping for static indexers

  • @TrowGundam
    @TrowGundam 3 роки тому +26

    I'm disappointed the "field" keyword for properties didn't make the cut for C# 10. It would have let me get rid of so much cookie cutter code when I work WPF.

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

      Same goes for the required keyword :(

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

      Microsoft doesn't care about WPF. Sad, but true.

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

      @@jankalfus42 Blazor WPF, Maui in .NET 6, do they really not care about WPF???

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

      @@jankalfus42 And what instead?

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

      @@jfpinero They really don't. WPF has been practically abandoned by MS, only receiving small patches from the **community**. The tooling is gradually becoming more broken as we get more awesome helper packages and complex functionality

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

    I'm happy to see F# features still flowing to C# by the bucket. Can't wait to have them back while working with C#. :)
    Static abstract might even be better in some cases than the explicit inlining chaos F# has been using.
    Now do type providers and tail recursion and units of measure. lol

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

    They did some really nice work on this version of C#. I particularly liked the decreased amount of nesting and clutter caused by namespaces and using statements. I feel like this is revolutionary in terms of code-overview in C#!
    Great video by the way, I subscribed!

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

    Great video! My favourite is Filescode namespaces, it'll just make every day work so much nicer.
    A quick tip on VS and SMSS (and some other editors/IDEs that want the same keybindings): Ctrl+K, C comments code (line if nothing is marked, marked code otherwise), Ctrl+K, U uncomments code (active cursor location and out).

  • @SecondFinale
    @SecondFinale Рік тому +1

    File scoped classes would also be great, possibly that get class name from file name.

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

    C# 10 has really great code-reducing features, however, the static abstract members feature ups the game. Yes, it does allow for something like strong units does in F#, however, it also gives you a way to implement a Factory Pattern without having to declare a separate class. This means, one less level of complexity, and factories really make it easier to use immutable types, which means less bugs and easier-to-use libraries.

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

    The last one is so amazing!! I've been waiting for something like this to be added, I'm seriously excited for this! It easily outshines the other changes, even though it is still in preview. The *with* keyword on structs as well as record structs are a close second - I already knew about those, but finding out we are getting what is pretty much Typeclasses has just really made my day, can't wait!

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

    You missed the perfectly valid opportunity to make "C# 10 features in 10 second" video ;D

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

    Incredible video. I was looking for something exactly like this

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

    Great video as always and thank you. Just taking some time to blow some smoke up your backside: it's really refreshing to hear on the last point, "I can't think of a use for this let me know if you can..." it's the tendency of a lot of big programming YTers to be incredibly patronising and thinking they have to know everything. I'm only amateur but find a lot of channels talk down to their viewers even on complex subjects. Your approach is much more level-headed and you don't talk down to your viewers which I appreciate and will cause me to continue watching and staying subbed. Cheers.

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

    Thanks a lot, Nick! A very nice overview.

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

    Nick you the boss!!! You're videos are hands down the best! Please consider creating some Pluralsight or Udemy courses. They would "sell off" as we'd say here in Jamaica.

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

    Nick I’m sure you have seen cases where abstract members in interfaces would be useful, maybe in an async creation pattern? As in, a class that requires some async behavior to be initialized, but you can’t put it in a constructor so you use a static method CreateAsync, that returns a task of the object, now that could be on an interface and mixed with generics to cleanup lots of repetitive code.
    And generic math is just cool

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

      I would never think to put that on the interface for a couple of reasons. It is really rare that I would need some async initialization and if I ever did I would do that as part of DI.

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

      @@nickchapsas that’s the usual way I go for it, but in this one case I had to go for the CreateAsync pattern for a long ass reason and it would have been nice to put that behind an interface

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

      It's the factory pattern, where this feature is super useful! CreateAsync is just another form of the factory pattern.

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

    Interestingly, I suggested file-scoped namespaces (and file-scoped class declarations) 12 years ago on the old C# suggestion tracker. Their response was that this would not be a useful feature.

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

    I know a few game engine devs who were wishing for the last feature :3 (static abstract interface implementations)

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

    OMG, C# 9/10 is sooo similar to modern javascript :-) Loving it!!!
    BTW, great material Nick

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

    That static interface thingy is ac hellalot of awesome but only really useful whenever you work with generics. Had the need for it a lot already, love they finally added it (next please stack allocated arrays and eg. Constants as generic parameters please @c#)
    Main usecase is hard to explain until you come across that kind of nightmarish (in c# at least) usecase, having to use factory classes or reflection and extensive caching to solve
    Regarding the async method builder attribute, cannot really share anything regarding what or how it exactly works as I did not upgraded the code of that part at work yet, but it is essentially for building custom tasks (which was a nightmare in the past with loads of compiler magic functions and behavior, AFAIK that should change that), researching into it is quite likely to yield great results (eg. Got a custom promise that allows to await events that rely eg. On the user. Allows loads of way nicer code)

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

    I like the idea of global usings in the .proj file. However, I certainly don't like some random .cs file having them.
    Fibers are a really neat addition! Fibers are essentially "green threads", something like go-routines. They also work co-cooperatively; however, they aren't guaranteed to run in the same thread.
    Static abstract members are indeed very niche, and most likely they're only really useful to make overloaded operators available to generic functions. *However*, that's actually really, really neat.

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

    Great language improvements!
    And great videos as always, Nick

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

    Thank you @Nick for all your videos. I have seen multiple videos in the last few days, and I must say: as a non-native English person, I sometimes don't understand what you say. You have an enormous speed, that surely is ok for the most of viewers. But these are "tutorials for every level", should you think about, that the entry levels perhaps have a problem with the speed of both presentation and speech? I remember one video, where you overlaid text - it was just impossible to read the text completely :( Yes, I know about a pause function, but this shouldn't be necessary.)
    Again, thank you for your work, the content is very useful!!! But I must wait to become a patreon, because I sometimes just give up ... Greetings from a German, living in Norway :)

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

      Hello there 👋. If I am talking too fast then you can slow me down by using the speed playback feature. Unfortunately I don’t think that my videos are for entry level engineers but rather intermediate to advanced. The majority of the audience prefers the fast pace rather the slow one. There are other creators, like Tim Corey, that you might find easier to follow. Ultimately I am making content that I would like to watch myself. Greetings from a Greek living in London.

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

      @@nickchapsas I will give the speed playback feature a try. I know Tim Coreys videos, and there I think it is too much 'overhead', compared with your content. Something in the middle would be perfect, but as long as I haven't found 'something in the middle', I think I will prefer your videos in the most of cases 😁

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

      @@nickchapsas wrote: "Unfortunately I don’t think that my videos are for entry level engineers but rather intermediate to advanced."
      Your Patreon banner says "... tutorials for every level". 😉

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

    Arguably, var text = () => default(string) is more readable.

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

      I personally can argue that Function is way better as var. In my opinion every developer tries to be lazy. When im reading code from someone else it mostly consists of var x = "bleh". Which makes me need to think about what kind of class x is. Why not keep it type specific also in code. Everyone should stop using var if it would be up to me.
      I don't think ability using var in any situation makes it more readable or less cluttered as the author of this video explains. In my opinion these are additions for the "lazy" programmer not to define things. But make them less readable for any third party.

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

    Man! I Wish I knew your channel earlier amazing presentation and production quality
    you deserve many more subs bro!
    keep it up!

  • @vladyslavhrehul2185
    @vladyslavhrehul2185 3 роки тому +12

    Nick, would you make video about structs? Should we use them or not?

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

      A video about structs, records and classes would be nice. The differences and when to use one over the other.

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

      A good rule to go by: if you're not sure if you should use a class or a struct, use a class.

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

    Man this youtube surfing is full of mystery, first I am watching diaper fashion video and next I am watching coding. I'll keep going, wonder where I end from here.

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

    15:20
    that is literally something I have tried to do but found out I couldn't, that's kinda funny

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

    “Intendation”? ;)
    Great and informative vid, Nick… I watch every one of your videos … keep up the great work! :)

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

    Really great video Nick! Thanks for sharing

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

    11:13 nice

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

    1:31 - hey, how did you open up the XML via Solutions Explorer?

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

    With the static abstract interfaces, would this allow you to perform mathematical operations in generic methods, if the constraints are set with these static abstract interfaces? It'd be really handy for vector and matrix functions, where you currently need overloads for vectors of ints, floats, and doubles, with the exact same functionality in each. Having a Vec3, instead of a Vec3f, Vec3d, and Vec3i, would be hugely beneficial. We still have no INumerical interface or equivalent constraint. This could offer a solution, or at the very least, reduce the clutter for any jury rigged workaround.

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

      Actually, we do have such a constraint as part of .NET 6 (set LangVersion to preview) that uses the static abstract members. INumber is what you probably want, but there is also more specific interfaces like IMultiplyOperators, IComparisonOperators, IFloatingPoint, etc.

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

    File-scoped namespaces. I can finally (and trivially) remove one indentation level in literally 99.999% of my code (and that 0.001% was just due to laziness, I can remove it there too). It's literally free (horizontal) real-estate.

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

    great sharing, save my time, thanks very much!~

  • @kirillzlobin7135
    @kirillzlobin7135 6 місяців тому

    5:32 - lamda improvements. Does it make Func, Actions and I guess something else obsolete?

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

    Great video, keep going.

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

    You are amazing, thank you for your time and great explanation!!!

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

    Great content as always! Thanks Nick.

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

    I don't know if its a C# 10 Feature or a .Net 6. But the new field keyword can be very nice to use. It makes a lot of code become a lot less.

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

      The field keyword was pushed to C# 11

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

    does VS have an option to follow a definition? For example if you were to select JsonSerializer and follow its definition it could direct you to where the 'System.Text.Json' is imported?
    Would resolve the issue of being unaware of which libraries are used and where from, etc...

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

    Really, really, nobody commented about 420 or 69 at 11:25.
    I believe even Nick kinda got upset about that.

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

      Oh I noticed straight away, in my work projects my unit tests are filled with these values

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

    Nice overview Nick, Thanks :)
    Question: Do you try api versioning into a minimal api? is it possible?

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

    Excellent video, thank you.

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

    Nick, can you make a video about Multithreading, locking deadlocks?

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

    You want to see why static abstract is useful, check how Rust implements operations on primitive types.

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

    I’ve faced issue when the was need in partial class within the same file because of different usings (they were conflicting).

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

    What's the shortest and quickest way to refactor the 'classic' Namespace to a File Scoped Namespace, desirably using keyboard shortcuts?

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

      Rider has that in the quick actions menu Alt+Enter

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

    As usual, Great explanation 👍

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

    Thanks for nice video. I have a general reflection on all the c# versions. Its getting really messy. I work at a place where we have like 50 microservices written in c#. There is no time (and would be waste of time) to constanly update to the latest versions. So as a developer you need to keep track of what version you are in. Sometimes the feature is not available so you have to go back to a earlier version of doing this. I have been working with c# since 2005 so Im ok, In know how to do everything in .net 1.1, but I cant imagine how a new developer would cope with this "mess".

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

    I am a bit confused about why they introduced record structs, it just makes it very confusing.
    Records were supposed to be immutable version of class. Now we have record structs that are actually mutable. Secondly now that we have record structs, why should one use structs instead of record structs or vice versa?

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

      Actually records could always have mutable elements. Think of them as data classes with some immutability first logic, but that's about it. Both record classes and record structs can have mutable elements, that doesn't change. Using record structs over structs are, again, a matter of usecase and preference. Do you have a struct that just have a few immutable properties and a constructor? Make it a record. Is it more complicated than that? Then maybe use a simple struct.

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

      Structs aren't immutable by default anyway.

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

    Hey, Nick! What Visual Studio Theme do you use in this video? Thanks in advance 😀

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

      It’s a different IDE called JetBrains Rider

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

    Can you provide a better example of the pattern matching? I don't understand why you wouldn't just put if(rectangle.Height > 100) {}.

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

    Please, how do I call methods in csharp 10

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

    Isn't it something very similar to module concept on VB?? Just asking

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

    I wish C# could add much more support for const expressions.

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

    So can we now have IoC with csproj?

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

    I still need to learn the features from C# 9.... Things are moving too fast for me 🤕

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

    I'm just here to comment on the "AssAndDeclarationInSameDeconstruction"

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

    Holy shit they added TypeClasses to C#

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

    Good job

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

    What made you switch to Visual Studio from Rider?

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

      I haven't. I'm only using it because Rider doesn't support all the C# 10 features yet. The moment it does I will switch back. I am not having fun at all with VS.

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

      @@nickchapsas fingers crossed, maybe it will be better when VS 2022 comes out in a few weeks?

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

    Nick what program do you use to broadcast your screen in overlay your head in the corner? I have to record some training videos for work, and I'd love to use a similar setup. In the past I've tried to record video on my screen but when it renders it's largely unreadable

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

      I am using OBS Studio and I have a green screen and good lighting to chroma key the background out

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

    Thank you very much!

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

    Dat JavaScript influence

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

    thanks

  • @Ра́миАль-Хешан
    @Ра́миАль-Хешан 2 роки тому

    Why you turned off subtitles in this video guide?

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

    Do global usings reduce performance?

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

      Usings are only used at compile time. May, possibly, slow down things while compiling but not runtime.

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

    Are you enjoying vs2022 or are you going to go back to rider?

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

      VS is fine but I can't wait for Rider to have full C# 10 support. Everything just slows me down and there are quite a few things I am missing. It is not a bad IDE but my experience can be summarized as "Death by a thousand cuts". I feel like Rider respects me and my time/productivity as a developer more. When both IDEs have their full releases I will make a video talking about it.

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

      @@nickchapsas Looking forward to that video :)

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

    it's something weird to see something old in c++ is a new feature LOL

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

      @Oddik Aro Use boost advanced tasks but there is particular situations you cant even use async in c# or tasks in c++ ex: sockets. you need to use it in outside process.

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

    Great

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

    Could you make videos on yaml pipelines?

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

    11:18 I see you’re a man of culture 😏

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

    nice

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

    Hey Nick, can explan newtonsoft framework? please! thanks :)

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

    I think this is more elegant .
    var someFunc=()=> default(string?);

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

    That function thing looks like es6 javascript

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

    Love it :-)

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

    Does anybody know what IDE this is? It doesn't look like rider👀

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

    I'm rather perplexed by global usings.
    Yeah, sure, you probably want to put System and System.Collections.Generic in every single file in your solution, but it seems kind of pointless for more niche/specialized namespaces.

    • @chrisroyle4813
      @chrisroyle4813 Рік тому +1

      We try and contain our company extension methods within the same namespaces per library e.g. Abc.Xpo.ExtensionMethod. Putting these into global usings will be a timesaver for us.

    • @Kantaros
      @Kantaros Рік тому +1

      @@chrisroyle4813 that makes a lot of sense. I'm even tempted to steal this 😁

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

    Static abstract classes look like Monoids to me.

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

    420, 69, all over the place :D

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

    Oh wow generic way of doing arithmetic, now I'll be able to make generics with a type restriction for things that have a + and - operators.

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

    String interpolation for const doesn't really make sense to me

    • @the-niker
      @the-niker 3 роки тому +2

      It means you can now use string interpolation in Attributes, because they require a const value. Imagine [MyHandler(Name = $"{nameof(MyClass)}Handler")] . There are other uses, I'm pretty sure I bumped against this limitation a couple of times and had to work around it in uglier way, just can't remember the specifics.

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

    Yeah, now let's wait like 3 years untill it comes to Unity lol

  • @lachee3055
    @lachee3055 Рік тому

    Global using is gross, i cant believe that got approved.

  • @robl39
    @robl39 2 роки тому +1

    Ref struct, record struct, record class, ValueTask, blah, blah. They are getting a little out of control IMO

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

    My like was the 69th, not that that is a special number or anything.

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

    Who the hell disliked this video? :D

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

    I dont agree with your love of var usage and inference from actions and functions.
    Having the type defined, eases the readability of the code.
    This seems like an attempt to obfuscate code.
    Code you should read as a sentence, easy to grasp.
    And while it can be subjective, I don't believe it is in this case.
    Func test = () => "Some text";
    and
    var test = () => "Some text"
    while takes a tiny bit less spass, also completely removes understanding.
    if your "result" isn't a declared constant , but a method, then the return is defined inside the method, and you are deliberately hiding the returned object via var, making the code harder to read.
    Not to mention the horror that is:
    var text = string? () => null;
    why would you not write:
    string? text = () => null;
    I hate that they permitted this.

  • @bies_moron4404
    @bies_moron4404 Рік тому

    C# become complete garbage :(
    C# 6.0 were perfect btw

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

    You know that global usings is going to be abused. How much time will it add to the build process when there are a lot of global usings? ;)

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

      To the build process? Nothing noticable.