Earlier quoted context omitted.
as an aside, if you got Rider as part of your resharper subscription, try it out, it is basically a drop in replacement for visual studio but faster and with many many little quality of life improvements you never knew you needed :)
> replacement for visual studio but faster How can a IntelliJ Idea derivative written in Java be faster than VistalStudio which is native code? Both Idea and PyCharm work much slower than VisualStudio on my machine.
C# Pattern Matching
121–130 of 214 posts
Re: C# Pattern Matching
#122Unfortunately although we are a small community, it does feel like being last on Microsoft priority list.
Microsoft please listen to feedback of your F# users namely on fslang-suggestions and fslang-design repository.
My personal wish list for F# are type classes, HKTs, macros and GADTs.
Re: C# Pattern Matching
#123Heads up for C# devs, you should switch all your code bases to use (x is null) and !(x is null) instead of ==. The is operator can't be overloaded, and always compiles to IL eq, whereas == can be overloaded in custom types. Of course it would also be nice if everything was moved to nullable reference types [0], but that's a non trivial amount of work. Note that most C#8 features can be enabled manually through the cs…
Re: C# Pattern Matching
#124Earlier quoted context omitted.
I have clocked in way more hours in Rider than VS. I can flawlessly run and debug our decades old monolith with 40-50 projects and millions LOC, containing C#, VB, Web Forms, WPF, files with 80k lines... And all of our .NET Core services on MacOS, with all my unix-y tooling. There is “VS for Mac”, but it’s not really VS. It’s Xamarin Studio rebranded. Rider works excellent on my Linux box at home as well, where the a…
I switched to Rider a few months ago but I still feel like I struggle with some things. For some reason I can’t change the position of the debugger when running and aspnetcore app and make it go back so I always have to re-run whatever request I happen to be debugging. Does that happen to you? It also seems like ReSharper had more tips and tricks going on when compared to Rider, but I can’t imagine that would be true…
Re: C# Pattern Matching
#125Re: C# Pattern Matching
#126Resharper has proven to be a great way for me to start learning and integrating new language features. I code in my original style and resharper suggests changes based on new features like pattern matching. At first I didnt see the benefit, but this is a hugely powerful feature once you start to wrap your mind around it.
as an aside, if you got Rider as part of your resharper subscription, try it out, it is basically a drop in replacement for visual studio but faster and with many many little quality of life improvements you never knew you needed :)
Re: C# Pattern Matching
#127Heads up for C# devs, you should switch all your code bases to use (x is null) and !(x is null) instead of ==. The is operator can't be overloaded, and always compiles to IL eq, whereas == can be overloaded in custom types. Of course it would also be nice if everything was moved to nullable reference types [0], but that's a non trivial amount of work. Note that most C#8 features can be enabled manually through the cs…
a number of the C# lang developers prefer (x is object) for the latter, FWIW.
Doing (x != null), !(x is null), or (x is object) all become:
ldloc.s
ldnull
cgt.un
stloc.sRe: C# Pattern Matching
#128Given that probably 90% of code is written by C or D class programmers, every new feature adds cognitive load that makes it less likely that the median programmer (who almost certainly works offshore and who likely doesn't have enough English skills to process the tutorials) will write bug-free code.
Once upon a time MS understood that highly educated university graduates are only a small percentage of the programmer market and kept that in mind.
Looking at the new language changes, that's been forgotten in order to please the programming elite.
Spare a thought for the poor souls who curse every time Microsoft adds a new blade to the Swiss Army knife of C# because they know they'll be the ones mopping up the blood of the countless programmers who've cut themselves on the new feature.
Re: C# Pattern Matching
#129Re: C# Pattern Matching
#130Apologies, but here's the obligatory link to my OneOf exhaustive type matching library: https://github.com/mcintyre321/OneOf
Hey I wanted to thank you! I stumbled across your repo a few years ago, when I was looking at more powerful ways to use the C# type system. I ended up pulling a heavily inspired version of your code into a utility library I made (for a zero dependency package). https://github.com/Matthew-Dove/ContainerExpressions#eithert Once again - thanks for your contribution to my learning!