cabbey,
@cabbey@phpc.social avatar

Does anyone have a better way to write the conditional calls to foo at lines 5-9 of this code? https://3v4l.org/fqCvv The goal is to have the default argument for bar trigger the default argument for foo, but they're different defaults (since one is nullable and the other isn't), and bar should not need to know what foo's default is. (obviously in my real code it's a much more complex signature, and separate classes.)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • everett
  • Youngstown
  • tacticalgear
  • osvaldo12
  • slotface
  • PowerRangers
  • hgfsjryuu7
  • khanakhh
  • kavyap
  • tsrsr
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • tester
  • rosin
  • modclub
  • thenastyranch
  • vwfavf
  • GTA5RPClips
  • Durango
  • ethstaker
  • mdbf
  • normalnudes
  • cubers
  • cisconetworking
  • Leos
  • anitta
  • All magazines