NativeAOT for .NET APIs Is Here and It’s INSANE!

Поделиться
HTML-код
  • Опубликовано: 3 май 2023
  • Check out my courses: dometrain.com and use code LAUNCH for 15% OFF any course
    Become a Patreon and get source code access: / nickchapsas
    Hello, everybody, I'm Nick, and in this video, we will take a look at the brand new NativeAOT support for .NET APIs. We will see what's supported, what isn't and how, by using it, we can achieve 10 times faster startup times and 10 times smaller application size.
    Workshops: dometrain.com/author/nick-cha...
    Don't forget to comment, like and subscribe :)
    Social Media:
    Follow me on GitHub: bit.ly/ChapsasGitHub
    Follow me on Twitter: bit.ly/ChapsasTwitter
    Connect on LinkedIn: bit.ly/ChapsasLinkedIn
    Keep coding merch: keepcoding.shop
    #csharp #dotnet

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

  • @cricket7994
    @cricket7994 Год назад +108

    if everyone had to learn dotnet from Nick it would be the most popular language

  • @lfbarni
    @lfbarni Год назад +28

    I use the publish single file a lot, very useful, being able to AOT compile it certainly would make it much nicer with all the speed.

  • @sapiencesoftware3089
    @sapiencesoftware3089 9 месяцев назад +3

    One thing to note, you can see when comparing the first api calls in postman.. you can see the first request in AOT is 7ms compared to 119ms! Sure there are some things you can do to mitigate this, but to have this right away is amazing.

  • @computer9764
    @computer9764 Год назад +4

    I can't wait to be able to do this for real-world applications.
    There's so many benefits of AOT, from the load time improvements, to the executable size, to the not having to rely on JIT on lower-end hardware.
    Hopefully we start seeing better tooling and such for microcontrollers and RISCV that will be able to take some of the education/hacker market share from micropython.

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

    Great video. Well done! Very accurate info based on my experience. Last year, I created a translation tool for our dev team (translate old HTML/VBScript to HTML5/JavaScript). Started out in .NET 6 self-contained, but then I switched it to .NET 7 AOT. The use case favors AOT with devs translating pages one by one. However, I built the translator to be able to spin through folders and translate multiple pages using concurrency. Translating 1K+ files under AOT is actually slower than under MSIL.

  • @81NARY
    @81NARY Год назад +12

    This is great for me! I'm building an open source end to end encrypted cloud storage and needed to build a CLI for people who prefer them (like me), and the file size of the executables were huge 😅 it's also one of those places where 10x start time improvements is quite actually visible.

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

      Be careful with the amount of Reflection you will be using, usually people end up using a lot of Reflection, using CLI frameworks.

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

    This is very interesting and exciting. Thanks for the great content!

  • @saeedbarari2207
    @saeedbarari2207 Год назад +7

    how is it that you have a dotnet news every day but at work my dotnet procedures haven't changed for some 2-4 years 😂

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

    Nice to see this gaining traction. Earlier this year I created authorizers in AWS Lambda using light weight NET7 Okta/Auth0 authorizer that had incredible response times for JWT validation. Probably the fastest thing I have ever built (simple though). Took a while to figure out how I would do the JSON source generation as that was new to me and the AWS SDK contracts don't match production AWS but I got it there in the end.

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

      How were you able to figure out everything to exclude and things that need to be source generated? I have an app but have not been able to work through all that yet for my aws lambda.

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

    Amazing 😻 Waiting for your example with AWS lambda web api, especially in case where your lambda should consume your own nuget packages from Code Artifact.

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

    Finally the feature is there. I love it!

  • @robotinike
    @robotinike Год назад +6

    C# é uma das melhores linguagens, por anos atuei, hoje com o Java, sinto muita falta do Dotnet......

  • @proosee
    @proosee Год назад +26

    When I saw minimal APIs, I thought, "huh, looks a bit like nodejs" - so, now, with NativeAOT, you can have node-like experience when creating small APIs without compromising performance for whole node VM overhead, which might be pretty useful for some applications.

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

      Its like a Golang with steroids lol

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

      @@gordonfreimann not exactly, I don't want to go into details, but since C# is compiled to IL some optimization can be made at the start of application (this is why startup is relatively long), whereas if you have fully interpreted language like JS it is almost impossible. JIT is a bit of a different story and, yeah, it is quite similar.

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

      ​@@EzequielRegaldo Wouldn´t necessarily say so, go is from the ground up built for this. So everything it can do just works without thinking about "can this be AOT compiled". The go compiler is also crazy fast at compiling. It´s not even close in that department (like seriously the go compiler is orders of magnitude faster). Runtime I don´t know... test it for your usecase I guess. For the most part I´d expect go to edge out c#. Both c# and go are much faster than my performance requirements pretty much all the time. I did not actually end up using go for anything that I want to keep alive though. But not because I think c# is hands down better, but because it would be more friction to keep it alive when I don´t use go regularly. I have to use c# at work so I can´t exactly forget the syntax. I would with go if I don´t use it for a few month. The main thing I wanted was a smaller file size for containers. So this change is gonna do exactly that.

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

      @@shioli3927 aot c# uses 30-40 mb, isnt huge difference

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

    Great intro on NativeAOT.
    But so far, it's only good in startup time (serverless) and publish size (docker), like Nick said.

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

    Looks like il2cpp from unity engine tool. I used it a lot. What i know after years: writing aot friendly code is difficult, but possible. And it always be few steps behind jit, and also will contain some bugs. But in some scenarios it's very good

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

    This is really nice for autoscaled microservices where spin up times are important.

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

    woww ! Thanks for the great content!

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

    Very nice. Ty! I wonder if it removes the startup cost of a new comnection. Dotnet is very slow on connections compared to native.

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

    I've already tried it and wile inspired by Eric Sink's articles where he links C libraries directly into the native AOT app did the same with some of our own applications. It looks pretty cool, but I don't think we will be able to do this in a real-world app just yet with the existing limitations.

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

    Do-Me-Train!
    Sorry, couldn't resist, really nice vid, thanks 👍👍👍

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

      You are not the first to bring this up 😂

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

      @@nickchapsas is it "Dome train" as in "get that into your thick dome"?

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

    hi Nick, thanks for very interesting and informational video. But let's imagine what in some minimal api project type which contains a lot of http clients and serialization flows (as example 5-6 different serialization models) . Now do we need to create each time (5-6) json serializer context(s) and register in start up? Or it not relevant to do? Thanks

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

    Тhanks Nick. I thick you should start making your videos on mac or linux since so many people have questions about supporting other platforms except windows

  • @andyfitz1992
    @andyfitz1992 3 месяца назад

    I know I'm 9 months late to the party on this but I love this, I was going to write an essay long paragraph on why this is just how c# should be written where you can but I'm too old and tired now to fight with developers who live by the mantra 'to simply exist and never push boundaries is enough', let their response time SLAs with clients be the thing that looses them the contract you win.

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

    Going to use it for AWS lambdas

  • @charlpohlmann4237
    @charlpohlmann4237 Год назад +15

    The more things change, the more they stay the same. If memory serves me right, MS removed the capability to compile to Native code in VB 5 (before the .NET days.) Then came along .NET with IL code, and now AOT is back again. Pretty soon I'm guessing MS will introduce a new language to the mix, and maybe they'll call it Assembler.

  • @der.Schtefan
    @der.Schtefan Год назад

    This is mainly usefull for command line programs, and IOT EDGE modules on memory constrained devices, or devices that update over slow 3G cellular.

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

    Would love to see you explore bFlat

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

    I hope it can finally apply to WPF/WinForm applications. It can also prevent such client programs from being decompiled in a sense.

  • @Alex-qt9oo
    @Alex-qt9oo Год назад +2

    what about some big projects where a lot of serializable objects? What about their memory and startup time?

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

    gRPC support is already enough to start using this feature. Very interesting.

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

    Enjoyed your contenT, THANKS! 2 QUESTIONS though: What are and how do you use extensions in the prompt? And why can't I save your video in my playlist? =(

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

    I don't need it but it's awesome!

  •  8 месяцев назад

    This is very nice for serverless applications.

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

    Very cool! Which console are you using?

  • @ref_softwaredevelopment5298
    @ref_softwaredevelopment5298 11 месяцев назад

    Yes. Finally it's here.

  • @user-sg4md6yh3q
    @user-sg4md6yh3q 4 месяца назад

    Whcih console application tool you are using while publishing the AOT app in the demo? which is showing colorfullp path?

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

    this would be way more popular if there was a transpiler/scaffolding tool that found all everything that used reflection and implemented an alternative automatically or if none existed provided meaningful error explaining which calls that will fail (and line numbers of course)

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

    could this be used instead of obfuscating my code that is running on user desktops to prevent people easily decompiling using dotpeek. Also is it possible to just build a library project with AOT then reference that dll in another normally built c# winforms/console app

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

    Yeah #dotnet10 as you say, that'd be grand. :-). Great video Nick!

  • @michaelnee1987
    @michaelnee1987 11 месяцев назад

    Most benefit will be for Lambda's and functions where you want it as small as possible and native.

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

    I didn't know that I needed till now 😂

  • @rafaelfabro4782
    @rafaelfabro4782 11 месяцев назад +2

    Will NativeAOT improve Azure functions cold start as well?

  • @justblue4864
    @justblue4864 Год назад +5

    Hi Nick! You are great teacher and I enjoy every clip you make. Have you thought on making these courses (from dometrain I mean) available also on Udemy?

    • @nickchapsas
      @nickchapsas  Год назад +6

      No this will never happen. My courses will always be exclusive to my own platform

  • @a-s733
    @a-s733 Год назад

    Nick, is this valid for Desktop applications as well?

  •  Год назад

    Nice!
    We can attach the nativeaot process on visual studio for debug the code?

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

      Yes but you'll be debugging a native app at that point which is a different experience

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

    How do we use this in a lambda? I had the concept that we use Api Gateway adressed to a lambda so we no longer need our lambda to be an API itself, i.e. we only need the function handler, what am I missing here?

  • @astarfullofskies8735
    @astarfullofskies8735 Год назад +7

    Hi Nick,
    amazing video and content, I have a couple of questions and a little premise:
    In order to gain the AOT startup time advantages, you always release your application, and then verify that the startup is faster as compared to the JIT compiler.
    If the application makes use of some not supported features, for instance, the reflection-based JSON serialization, you just "discover" the error because you get an internal server error the moment the API is called.
    1) Is there anything we can do to make the application fail at startup time?
    I feel like it's ok that some features are not supported, but it's not really optimal to discover what you did wrong at Runtime, it is bad for the user experience and it violates the concept of "fail fast".
    2) You always release the application and then take measurements, is it possible to debug native code?

    • @GumbootMan
      @GumbootMan Год назад +5

      1) Is there anything we can do to make the application fail at startup time?
      The compiler will emit warnings if you are compiling for NativeAOT and it detects code patterns that are problematic. You can actually see just such a warning in the video (it's the big block of yellow text). If you want the compilation to fail entirely, just enable the "treat warnings as errors" feature in the project file.

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

      @@GumbootMan thank you! This is a good practice in general, also outside of the AOT scenario

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

      @@GumbootMan It would be great to add some attribute that would allow you to tag an assembly as AOT compatible/incompatible, so that we could see an error at compilation. Would be great for libraries that rely on reflection, or runtime compilation.

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

      ​@@nocturne6320 that's exactly how the warning systems works. Libraries that have been annotated as trimmable and had their APIs decorated with the appropriate attributes will result in analyzer based warnings at design time & compile time when the consuming project is marked for PublishTrimmed or PublishAot

  • @ArnonDanon
    @ArnonDanon 9 месяцев назад

    Very cool indeed but i hope the efforrt are not in one direction only, i'm worried about compatbilty. "Tommorow" this will be the new way to do things and im still "fighting" to move from controllers accepting xml to minimal api. I like the fact the we are getting a glimps to the future but i hope not to much will be "barried" in the past (signalR for example).

  • @HNoriega
    @HNoriega Месяц назад

    Hi Nick, can i use this ApiJsonSerializerContext with Generic Types? Like

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

    Anyone know if Complete Course Bundle will also include a future courses or just the released ones?🙂 Btw. Thank you for your videos on youtube Nick.

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

    I'm wondering why did you mention docker and native compilation in one sentence. Is docker still necessary for AOT compiled applications?!

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

    Great video, Nick! Have you considered whether Native-AOT supports Linux? It could be beneficial for containerized applications if it's faster than AKS. What are your thoughts on this?

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

      It’s does support Linux and with .NET 8 it supports MacOS too

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

    Hi, how to make my terminal looks like yours?

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

    Feels like a huge improvement for the future of serverless with this greatly reduced start up time. Really looking forward on how serverless will evolve in few years.

  • @feefifofum6383
    @feefifofum6383 6 месяцев назад

    Anyone know if this would be a good idea with isolated azure function apps? Do they execute a new instance on each invocation?

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

    Tried to try it.... but it isn't supported in the official 8.0 docker image

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

    would you use this in prod?

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

    How does this startup performance improvement scale? Is it always x times faster even for bigger/more complex applications, or always 100ms faster?

    • @nickchapsas
      @nickchapsas  Год назад +8

      We'll take a very close look at that in the next NativeAOT video :)

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

      @@nickchapsas Exciting!

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

    How does it affect integration testing? You need to change your code in some cases as you said (reflection). How do I test that using automated testing? Can you run integration/unit tests against native code? If so, do you still need to change how you develop/run your tests (IDE tools, additional workarounds)?
    If I can't develop automated tests to make sure my code works, that is a big deal breaker for me.

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

      You cannot test using the usual approaches once you've published native AOT. Typically you'll write your tests as normal with the testing framework of your preference and run those tests in non-AOT mode. How you approach automated functional testing of the native AOT app output will depend a lot on the type of project it is (web UI, web API, grpc, etc.)

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

      @@DamianPEdwards Yes, that is what I was saying and it is a big no-no for me.

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

    Nick I have other question. Is your chair good for long work on computer ? I see that it is gaming chair. I found a lot of info that only ergomonic chair can be comfortable. Thanks in advance for asnwer! 😊

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

      I’ve been using it for 2-3 years now and I’ve been very happy with it. I sit on it for 10-18 hours a day

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

      I can really recommend the Herman Miller Embody if you can afford it :)

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

    I did not understand something: basically if you generate the code with the AOT are you basically compiling both your stuff AND the kestrel webserver together?

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

      Yes, everything into that since file

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

    Nice

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

    How about the decompile? For Native I is it still possible?

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

      It’s native code so just like native code

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

      You can read assembler instructions via IDA for example, but can't get source code.

  • @KieranDevvs
    @KieranDevvs Год назад +4

    The biggest lacking feature for me is the ability to statically link native dependency assemblies. It defeats the point of single file publish and limits it to managed assemblies only.
    Also the file size output test wasn't fair, you'd need to enable trimming under link mode in the managed assembly, to have a fair comparison.

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

      You can statically link some Linux native dependencies. What native dependencies were you trying to link?

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

    This may be why azure functions are slow on applying AOT... since most functions I write opperate at a higher tier where the code is always running. I do this do to start up times... By not supporting this many people are forced to a higher tier.

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

    How to do the 4:57 implementation in Visual Studio 2022 community?

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

    i think this is great match with azure func or aws lambdas where you are penalized for cold start significantly

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

    Does this work with EntityFramework?

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

    "Preview" agian? Nick, can you tag videos about preview features somehow, please?

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

    Well, we could be expert at other languages such as Go until we have full support for AoT and have these things much sooner :P

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

    May I know the IDE you're using?

  • @ilia-tsvetkov
    @ilia-tsvetkov Год назад +3

    What about Native AOT for Linux, as nobody hosts their apps on Windows anyways?

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

      Sure just compile it for Linux. Both Windows, Linux and MacOS are supported for both x64 and ARM64

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

      ​@@KimBrusevoldTV You can actually use a docker image to build it in the docker image as well. That's how AWS allows you to build NativeAOT Lambdas form windows for Linux

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

    Why will anyone use GO after this feature is fully supported. Learning GO was amazing but using it not that much. I guess I will stick with c# for a long long time!

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

    👍

  • @shbita
    @shbita 8 месяцев назад

    how to do it in linux ? there is no visual studio there

  • @AEF23C20
    @AEF23C20 14 дней назад

    this has been working for a long time
    GAC cancelled?

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

    Is there a command line option to build aot instead of modifying the project file?

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

      Yeah you can always pass csproj parameters through the CLI.

    • @DamianPEdwards
      @DamianPEdwards Год назад +8

      @@nickchapsas We don't recommend that approach as the PublishAot property set in the project file will also enable the trimming and native AOT analyzers, resulting in warnings during design-time (in the editor) when you call APIs that can cause incompatibility issues with native AOT. So yes, technically possible by passing the property value as stated, but as designed it's intended to be but in your project file.

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

      @@DamianPEdwards thanks! that's a very important clarification of the use and effect of AOT on the application design

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

    is linux arm64 supported yet?

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

    use autocannon to compare the diff...

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

    What about garbage collection?

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

      There’s still a garbage collector in there

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

    Shit, finally back to sanity? I hate packed/unpacked/self-contained/or whatever and huge nonsense compiled files! This should be the normal output as it was years ago.

  •  Год назад +1

    I wouldnt use it yet, maybe in the future

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

    My face after watching 5+ minutes and slowly realizing that I confused AOT with AOP.

  • @IvanRandomDude
    @IvanRandomDude Год назад +11

    I am sure they are not magically 10x faster just by compiling them to native executable. Maybe 10x faster startup time. But overall no way. It might even get a little bit slower.

    • @drewfyre7693
      @drewfyre7693 Год назад +13

      He says exactly that in the video. Did you even watch it?

    • @IvanRandomDude
      @IvanRandomDude Год назад +8

      @@drewfyre7693 Yes. I was simply addressing the clickbait in the thumbnail

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

      It’s 10 time faster startup, not runtime like mentioned in the video.

    • @phizc
      @phizc Год назад +6

      @@nickchapsas To be fair, the thumbnail does say "10X FASTER AND SMALLER .NET APIS". 😄

    • @jeonsywork
      @jeonsywork Год назад +5

      @@phizc Gotta get them clicks somehow

  • @Inf4mousKidGames
    @Inf4mousKidGames 7 месяцев назад

    so machine code... cool

  • @LilPozzer
    @LilPozzer 9 дней назад

    😢😢 ef core is just 😮😮😮😢😢😢 gone 😢😢

  • @Kingside88
    @Kingside88 Год назад +4

    I feel like Microsoft optimize thinks which are fast enough for 99,9% of the users.
    But do not care of thinks people really needs.
    For example:
    1. XSLT Parser is still in Version 1.0 and do not XSLT transformation 3.0
    2. RDLC is still not in plan for creating reports
    3. Developing Backend with minimalApi and ASP WebApi is both very nice but when it comes to front end, there is no real competition to nodeJs. Razor is old and Blazor is slow and has a small environment.

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

      I think there's need for real time applications, and I do believe that such low level functionnality is a step to achieve that.
      It's been long I have not used xslt, but I remember that the xslt processor can be extended. There may be an extension library to achieve XSLT 3.0.

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

    Blazingly fast

  • @der.Schtefan
    @der.Schtefan Год назад +1

    Why is everything "INSANE" nowadays? Technology develops, things get smaller, small programs used to be small. NativeAOT does exactly what it advertises. How is that "INSANE" in all-caps? I would call it insane if it would NOT perform how it performs.

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

    GO's dead
    Edit: Oh wait, not yet but soon

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

    I hope it includes a garbage collector in it! 😂

  • @LucasOliveira-sn8ls
    @LucasOliveira-sn8ls Год назад

    Also, the security of an AOT app has no comparison with a JIT app

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

      How do you define security here given that it’s a very broad term that could mean anything

    • @LucasOliveira-sn8ls
      @LucasOliveira-sn8ls Год назад

      @@nickchapsas I mean, we can't revert a code generated as AOT so easily then revert a code using JIT, there is some tools where we could revert a JIT compiled application and see the code behind it...

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

    Without JWT support it is useless...

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

    A couple of notes.
    First, I don't know what AOT stands for and had trouble finding this online.
    Second, it has bothered me since .NET Framework 1.0. Why has Microsoft resisted being able to compile to native code? I've always thought the JIT compiler was silly. This seemed like the obvious need to me. And yet it's considered an exciting new feature now? This is insanity to me!
    Finally, why is this specific to APIs? Let us compile our code please. Not just for some tasks. Just let us compile our code!
    The thinking behind all this here is really annoying.

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

      Because C# is not C++? It's designed to run in a runtime as managed code, with garbage collection... It's designed to be agnostic of processor architecture. Also it;s Microsoft's answer to Java and the JVM

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

      AOT means "Ahead Of Time", the opposite of JIT "Just In Time".

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

      @@GumbootMan Before C# came out, I had a background in C and C++. I'm not saying compiling to native code is trivial, but it isn't that hard. It's just that the mindset behind .NET has been going in another direction for reasons I never quite understood. And now changing that design to more easily compile to native code may be hard.

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

      @@HikingUtah Right, compiling to native code isn't that hard. The JIT is doing that already, you "just" need to run that as part of the compilation process. I'm saying that's not the problem, the problem is dealing with dynamic features like runtime code generation, reflection and runtime assembly loading. These features have been there since .NET 1.0 (I'm pretty sure) so it's not really a change in direction. Of course you may argue that these features are more trouble than they're worth but MS doesn't really have the luxury of ignoring them now that they are so widely used.

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

      AOT = Awesome Optimization Tricks

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

    Java is still better, because it's an awesome and beautiful island, while C# is just another programming language... :/

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

    Seems odd that it's not supporting reflections. There are already attributes to flag classes and class members so that they don't get trimmed, so it's odd that reflections and the default json deserialization functionality would not work.
    But of course your 3rd party libraries are gonna be hit/miss since they probably won't have their classes properly flagged.

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

      Seems like a good reason to be weaned off reflection and move on to source code generation

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

    that super sexy ohmyposh cmd line =]

  • @zeeluck7128
    @zeeluck7128 Месяц назад

    ERR_SSL_PROTOCOL_ERROR when created project without any change