4 ms·
Excellent piece. Esp. this: > There are a few simple patterns we can apply that make conditionals less intertwined. They include: ‘return early’,‘use ternarie
by DeBraid 10y ago
Excellent piece. Esp. this:
> There are a few simple patterns we can apply that make conditionals less intertwined. They include: ‘return early’,‘use ternaries’, ‘replace switch-statements with objects.’ These are not silver bullets, but rather, handy weapons for fighting complexity.