Loading video...

Video Failed to Load

Go Home

Does this make our #chsarp code cleaner? #dotnet

17,790 views • 2 years ago •via X (Twitter)

10 Comments

Stefan Đokić | .NET's profile picture
Stefan Đokić | .NET2 years ago

Absolutely.

Slavka_'s profile picture
Slavka_2 years ago

today.DayOfWeek.ToString(“G”)

Dan Patrascu's profile picture
Dan Patrascu2 years ago

that, unfortunately, doesn't answer the question. Do switch expressions make our code cleaner compared to switch statements?

Kai Radewald 🇪🇺🇺🇦🇮🇱🇨🇦📯🚲🌈♻️💚's profile picture
Kai Radewald 🇪🇺🇺🇦🇮🇱🇨🇦📯🚲🌈♻️💚2 years ago

I like it more, it's more concise, and doesn't resemble goto so much.

Asadbek Sindarov's profile picture
Asadbek Sindarov2 years ago

C# is going towards being more of a functional programming language. It lacks a couple of things that other fp languages offer, but I still like using C#. I personally like the features for switch expressions and records as well

Michael Marino's profile picture
Michael Marino2 years ago

Yes, and it removes the possibility of forgetting to assign the variable, or assigning to the wrong one in the middle of the switch statement.

Satyabrata Dash's profile picture
Satyabrata Dash2 years ago

This makes it way more cleaner.

A Non Gamer Dev's profile picture
A Non Gamer Dev2 years ago

Of course it's cleaner

elduwani.dev's profile picture
elduwani.dev2 years ago

So pattern matching like #fsharp

Serhat's profile picture
Serhat2 years ago

aren't these kind of additions just make the code non readible? I don't like these kind of changes in c#

Related Videos