|
|
|
|
|
by WorldMaker
1118 days ago
|
|
I'm finding switch expressions filling that gap a lot lately. I've also picked up at some point a bad habit in "borrowing" JS' ugly IIFE pattern in C#. var x = (() =>
{
var z = whatever;
...
return value;
})();
It is not the most performant way to write that code and if the contents start to get long, refactoring to its own method starts to feel more likely, but in one-off cases, it seems fine for how ugly it is. |
|