avidamoeba, (edited )
@avidamoeba@lemmy.ca avatar

I’m sure you are capable of rewriting that in 3 lines and a single nested scope followed by a single return. In fact in languages that use exceptions you have to use at least one subscope.

Notice that in my example I didn’t even broach the example with error conditions, cause it’s trivial to write cleanly either way. Instead I talked about returns inside business logic. You can’t unfuck that. 🐞

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmerhumor@lemmy.ml
  • rosin
  • Youngstown
  • osvaldo12
  • khanakhh
  • slotface
  • tacticalgear
  • InstantRegret
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • everett
  • magazineikmin
  • Durango
  • provamag3
  • GTA5RPClips
  • ethstaker
  • modclub
  • mdbf
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • megavids
  • tester
  • anitta
  • JUstTest
  • lostlight
  • All magazines