5 ms·
My favorite part of dotnet 6 is the focus on hot reloading not mentioned here. Being able to work on a webapp that rapidly reloads in under a second is huge. I
by throwaway13337 5y ago
My favorite part of dotnet 6 is the focus on hot reloading not mentioned here.
Being able to work on a webapp that rapidly reloads in under a second is huge. It allows me to maintain the state of flow as I'm bringing something to life.
I had a unique use case wherein I had a separate worker thread that also needed reloading with the hotreload. I was able to hook into the hot reloading via "[assembly: System.Reflection.Metadata.MetadataUpdateHandler(typeof(MyHotreloadClass))]" and quickly solve my issue. I was pretty surprised to be able to modify that so easily.
The focus on performance and programming ergonomic makes me optimistic about the future of the platform. As someone who deploys to linux and is generally way outside of MS' ecosystem, this seems like a pretty big deal.
- tasogare 5y agoThe thing I like the best with dotnet (core) is how great is the cross platform support (for console and web applications). I use macOS most of the time, to build Linux containers and this works perfectly. I recently found a bug in the SDK... which impacts Windows only. Other OS than Windows are really supported.
- fmakunbound 5y ago> My favorite part of dotnet 6 is the focus on hot reloading not mentioned here Does this work, for example, to reload method changes and so on? I miss this coming from JVM.
- throwaway13337 5y agoIt really works! "dotnet watch" and go. It watches your C# files for changes and reloads when it notices on save. I use VSCode not visual studio which has some deeper integrations there I guess. But it's still fine. It's only available in 6, though, as far as I know for real sub-second hot reloads. As it's a preview release right now, it's not as fun to set up but it's not too bad. 5 and below has reloading on code change that isn't quite instant (takes maybe a few seconds) but still works with the same command.
- e67f70028a46fba 5y agoFun story: back in 2009 at the jvm language summit, Thomas Wuerthinger demo’d full hotswap. Method signature changes, class hierarchy, all of it. He wasn’t a sun employee at the time and the sun folks kept telling him what he was doing was impossible. We ended up using his stuff, the dcevm, internally for a long time. He was eventually hired by sun/oracle to work on other stuff and Java still doesn’t have proper hotswap. That’s the tech world for you.
- stephankoelle 5y agoHis stuff is still around, maintained and very useful via: https://github.com/TravaOpenJDK/trava-jdk-11-dcevm https://github.com/TravaOpenJDK/trava-jdk-11-dcevm They say, that java on graal should have full hotswap. https://www.graalvm.org/reference-manual/java-on-truffle/hotswap-plugin/ https://www.graalvm.org/reference-manual/java-on-truffle/hot...
- deleted 5y ago[deleted]
- foepys 5y agoEven .NET Framework supports this in a limited fashion. Start an application in Visual Studio with a debugger attached, break at a breakpoint, change a line, save, and continue with the new code. No application restart necessary.
- Someone 5y agoVisual C++ had that years ago (2005, reading https://blog.codinghorror.com/revisiting-edit-and-continue/ https://blog.codinghorror.com/revisiting-edit-and-continue/) IIRC, that required a debug build that didn’t run very fast and was a bit fickle. Managed languages maki it a lot easier to implement this kind of features.
- ComputerGuru 5y agoNot since async was added. You can’t make changes to any async methods because they haven’t figured out how to update the state machine.
- teh_klev 5y agoVB5/6 had that back in the 90's. /gets housecoat, pipe and slippers :)
- cbsmith 5y agoEverything old is new again. ;-)