Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Does this make our #chsarp code cleaner? #dotnet

17,790 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von Stefan Đokić | .NET
Stefan Đokić | .NETvor 2 Jahren

Absolutely.

Profilbild von Slavka_
Slavka_vor 2 Jahren

today.DayOfWeek.ToString(“G”)

Profilbild von Dan Patrascu
Dan Patrascuvor 2 Jahren

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

Profilbild von Kai Radewald 🇪🇺🇺🇦🇮🇱🇨🇦📯🚲🌈♻️💚
Kai Radewald 🇪🇺🇺🇦🇮🇱🇨🇦📯🚲🌈♻️💚vor 2 Jahren

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

Profilbild von Asadbek Sindarov
Asadbek Sindarovvor 2 Jahren

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

Profilbild von Michael Marino
Michael Marinovor 2 Jahren

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.

Profilbild von Satyabrata Dash
Satyabrata Dashvor 2 Jahren

This makes it way more cleaner.

Profilbild von A Non Gamer Dev
A Non Gamer Devvor 2 Jahren

Of course it's cleaner

Profilbild von elduwani.dev
elduwani.devvor 2 Jahren

So pattern matching like #fsharp

Profilbild von Serhat
Serhatvor 2 Jahren

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

Ähnliche Videos