7 ms·
I just turn my head to look at my bookshelf, and sure enough, there it is, my C# 6.0 & .NET Framework 4.6 book. That was the last version I worked. Nice to rea
by pelagicAustral 4y ago
I just turn my head to look at my bookshelf, and sure enough, there it is, my C# 6.0 & .NET Framework 4.6 book. That was the last version I worked.
Nice to read about all the changes in C#, I've been thinking a lot about going back to .NET, but at this point I would probably need some training. There are things like Blazor or .NET Core that I'm absolutely unfamiliar with.
I kind of miss Visual Studio for some reason, after what feels like a lifetime of web development in other open source tech stacks.
- philliphaydon 4y agoI think .net 3.1-6 has settled enough now that the confusion is more or less gone.
- oaiey 4y agoOh indeed. The language and the normal coding style evolved significantly, the base class library evolved and the whole base promise of the language switched from supporting UI apps and Windows services to be a top contender for any program type you currently can imagine. Learn .NET Core (nowadays called just .NET). It is a fresh breeze to your memory. So easy, so rewarding compared to the complexity of Java or Node dependency trees.
- jsiepkes 4y ago> So easy, so rewarding compared to the complexity of Java or Node dependency trees. How do Java dependencies differ much from C#?
- taspeotis 4y agoIf you want to come back and dip your toe in the water, Visual Studio 2022 is better than ever. But Rider is a great IDE and I’d recommend starting an evaluation of that.
- hirvi74 4y agoI feel like 2022 is the slowest edition I have used. My 2017 instance is still significantly faster. I've also had a hell of time with "Hot Reloading" and even the debugger in general.
- Stevvo 4y agoAbsolutely; the language moves fast. Around 2015 I was using C# at work. Last year I did some code review on a C# project and at first I had no idea what I was looking at. The new features and design patterns used made it like reading a language I had never seen before.
- aksss 4y agoIt’s pretty easy to pick back up and get in the swing of things - and very fun too. Lambda expressions and async programming might take the most study and practice to really feel comfortable using. Blazor server side is a new but very accessible paradigm, particularly with free component libraries like Radzen and MudBlazor. Dapper helps as an alternative for those not willing to go full EF for data access. Visual Studio 2022 is a nice, refreshingly automated environment. Azure has a ton of ridiculously fun tools like devops, key vault, functions, app service, etc.
- codeflo 4y agoI’m perhaps in a similar camp, years of experience during the .NET 4 era, a lot of TypeScript and Rust after that. Recently, I went back to C# for a smaller project. The .NET ecosystem certainly has its advantages compared to the “wild west” of NPM, which includes Visual Studio/JetBrains Rider. My main problem was that the language feels so dated at this point. Why can’t I make local variables immutable? Why are there still no algebraic types? Why do the new nullability rules feel so inconsistent and tacked on, with “String?” and “DateTime?” behaving completely differently? I realize not everybody cares about these “modern” features as much as I do, but once you’ve wired your brain to think about program composition in a way that simply feels better to you, it’s very frustrating to go “back”. . Edit: It’s not like the C# team is unaware of or in any way against these proposals. There just seems to be little visible progress: Algebraic types: https://github.com/dotnet/csharplang/issues/113 https://github.com/dotnet/csharplang/issues/113 Const locals: https://github.com/dotnet/csharplang/issues/188 https://github.com/dotnet/csharplang/issues/188
- tester756 4y ago>Why can’t I make local variables immutable? How it'd work in such a case: You declare immutable variable "a" which's an instance of a class and then you execute "DoSomething" method which mutates under the hood? Compilation error? runtime error? Anyway have you tried records?
- codeflo 4y agoI’d be fine with semantics similar to readonly fields (and incidentally, “const” in JavaScript): you can’t reassign the variable, but the contained object can do what it wants. To your last question: Yes, records are really nice syntactic sugar for classes that want to behave like values.
- awild 4y agoIt's usually on a syntactical level, to disable reassigning a value. For objects this means the reference is still mutable, value types are locked. Js has const, C has const, Java final. Imho it'd be awesome if mutability were not the default and we would have to mark mutability, but until then any variable that doesn't need it, is final. Which also helps skimming code
- maccard 4y agoEchoing the sentiment, I was a visual studio user for the best part of a decade, until Rider appeared on the scene. Rider/intellij is the new bar for developer tools today IMO.
- tester756 4y agobut why? I'm asking because I do use extensions like Roslynator for refactorings I'm not sure what I'm missing, what fancy Rider has?
- moogly 4y agoRider has all of ReSharper but without the performance hit that you get in VS + ReSharper.
- tester756 4y agoOk, but I've been talking about Roslynator (free refactoring extensions), not Resharper
- moogly 4y agoI haven't tried Roslynator (since I stopped using VS years ago), and to be fair you said "extensions like Roslynator". Just trying to give a bit of an elevator pitch for Rider. The analyzers in Roslynator would definitely still work in Rider (that's just a Roslyn compiler feature), but not any extension-only refactorings, that's correct.
- maccard 4y agoCaveat: I'm writing C++, not C# but, Rider does out of the box what I used extensions for for the best part of my time working in Rider to start with. The IDE is faster to start up, faster to use, the tooling works better than the visual studio tooling, the licensing is sane, the source control integration is an order of magnitude better than VS's. The code completion for intellij tools is what you'd expect, for VS it's... varied depending on whether or not VS has parsed your project yet (and good luck figuring out when that is). Code formatting tool support was substantially better (although still not ideal) in rider than VS, and VCS backed project settings mean that we can have developers auto format locally rather than building out tooling to enforce it. Cross platform support, with remote editing is also a huge one for me. I have a windows workstation and a Mac as a secondary workstation. Before, I had to remote into the mac and use XCode to debug/build issues on the mac, now I use rider with remote support for 95% of my mac needs, and on occasion when I do need to drop back to the mac, I'm using the same tool rather than xcode. Until 2022 (which granted I haven't used), VS was 32 bit which despite MS's frequent assurances wasn't a problem, was. Running OOM was a regular occurance on large projects for me over the last 10 years.
- NicoJuicy 4y agoBiggest chance in dot net core is IoC by default and syntax sugar ( eg. Tuples) Since .net 6 things are changing more. Eg. The first time with a minimal API needs a bit of exploration. In general it's explained by global static functionality. Blazer is c# and a different way of writing websites.
- oaiey 4y agoASP.NET, Blazer and Maui are IoC by default because they are complex franeworks, .NET is not.
- NicoJuicy 4y agoAlmost all projects are using those frameworks. Asp.net MVC 4.5/webapi and before did not have IoC build-in.
- metaltyphoon 4y agoRight… so before people had to manually add ioc for all those projects then might ass have a default one, which is swappable if you don't like it.
- NicoJuicy 4y ago? I think you should reread what I said. It wasn't there before, it is now. I didn't say anything about if it should be there. Eg. I know an older developer who still doesn't see the benefit. So it's useful to mention that it's in there now.
- radicalbyte 4y agoInstall ReSharper, write code your way, then click on the suggestions. It'll rewrite a lot fo code for you to the new style. Do that for a week and you'll get back. I'm not spending as much time as I like coding C# nowadays but keep the R# subscription up, it's invaluable when I need to get back up and running.