you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 5 days ago (1 child)

Use early returns for gates.
Use functions for complicated "getters" (this is actually a move beyond their "getTheme" or "getDashboard" kinda examples".

Dont use complex nested of ternary or null coalescence.

Ie. Write readable code, not code golf.

Has some good examples of what not to do.

  • source
  • hideshow 1 child comment
  • [–] 1 point 5 days ago

    Yep. Syntax sugars exist for a reason. Abusing any feature in a language will make it hard to read. Just take a look at the other article posted about building pipeline. Or heck, any other design pattern that becomes dogma like OOP in Java.

  • source
  • parent