A Very Elegant Way to Write C# Code - Switch Expressions

  Рет қаралды 15,348

Milan Jovanović

Milan Jovanović

Ай бұрын

Пікірлер: 32
@mfsbo
@mfsbo Ай бұрын
Readability of code that human writes is far more important to converting it for machines. Thanks for sharing what is offered but its like spreading the butter with your folk lifter is not needed but can be done.
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
"spreading the butter with your folk lifter" 😂
@repkins
@repkins 16 күн бұрын
While switch expressions does make code more consice, it comes with readability price.
@MilanJovanovicTech
@MilanJovanovicTech 16 күн бұрын
Is it not readable?
@WDGKuurama
@WDGKuurama Ай бұрын
Noooo, it just needed the one liner func syntax with '=>' at the second line to be perfect 😢
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Oh well...
@norlyssuarezvalderrama5330
@norlyssuarezvalderrama5330 Ай бұрын
Great 👍
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Thank you! Cheers!
@YehorBachurinDev
@YehorBachurinDev Ай бұрын
👍
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
👍
@Claucker7
@Claucker7 Ай бұрын
not readable
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Ok
@vijayarajan-bt5fk
@vijayarajan-bt5fk Ай бұрын
Why _F only for f finally??
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
It's how you write the default case
@rikudouensof
@rikudouensof Ай бұрын
I would not advice this. Codes should be readable for the future people
@JollyGiant19
@JollyGiant19 Ай бұрын
But this is readable
@rikudouensof
@rikudouensof Ай бұрын
@@JollyGiant19 my take is that code should be in a way that junior devs or intern devs can understand
@ryan-heath
@ryan-heath Ай бұрын
Future people would thank you when you don’t use (then) outdated constructs. 😉
@WDGKuurama
@WDGKuurama Ай бұрын
Not using new syntax while lew devs will most likely use them because you think it wouldn't be readable sounds very wrong. Especially with such a simple and common pattern. It just looks that way on a lot of other languages, especially more on functional programming ones.
@rikudouensof
@rikudouensof Ай бұрын
@@WDGKuurama it alswys starts with the simple patterns untill someone cooks technical dept
Exceptions Are Extremely Expensive… Do This Instead
17:15
Milan Jovanović
Рет қаралды 36 М.
A Step-by-Step Guide for the Cache-Aside Pattern + Stampede Protection
19:29
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 173 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 42 МЛН
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 203 М.
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 399 М.
5 Sure Signs You're No Longer Junior Programmer
13:21
Zoran Horvat
Рет қаралды 46 М.
Switch IS NOT FASTER than if, (in C++)
11:39
Low Level Game Dev
Рет қаралды 21 М.
Your Seiko Might Be Fake
5:15
Clicky Bezel
Рет қаралды 53 М.
How principled coders outperform the competition
11:11
Coderized
Рет қаралды 1,6 МЛН
Yanlışlıkla Telefonumu Parçaladım!😱
0:18
Safak Novruz
Рет қаралды 7 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 70 МЛН
Это iPhone 16
0:52
Wylsacom
Рет қаралды 3 МЛН
Nokia 3310 top
0:20
YT 𝒯𝒾𝓂𝓉𝒾𝓀
Рет қаралды 5 МЛН
Лучшая защита экрана
0:40
Newtonlabs
Рет қаралды 83 М.