When is a function a bad investment?

When is a function a bad investment? "When there's no return"


This is a pun. The joke refers to good investing practices as well as programming. The word return is the center of the pun, and it means both "money that you get back from an investment" and "value that is passed back from a function".

A function that does not pass back a value is called a void function, but they are useful if the function changes the state of the object that it is being called on, or if it affects some other part of the world (such as a draw function that draws something to the screen but doesn't return anything.)

This joke is pretty bad.

Comments

Labels

misunderstanding unexpected bar knock knock Christmas programming definitional bad dad talking animals anti-humor failed expectation irony political airplane dark lie black elephant language onomatopoeia Biden deconstruction disability literal math ambiguous grammar self denigrating false assumption garden path misfortune occupation rude canadian internet explorer knowledge mass culture physics slapstick illogical put-down racist surprise animal bathroom humor contradiction english funny punchlineless sarcastic setupless shaggy dog stupid toilet humor alcoholic aptronym black humor board game body humor cat covid-19 death depression dog famous person hyperbole impulse control insinuation juxtaposition lazy meta nationalist one-liner photoshopped pop culture sad but true speech problems stealth surprised pikachu unstated Halloween Karen Lord of the Rings archetype breaking behavior dissonance blonde cheese chicken circular confirmation coronavirus dated deliberate dissonance fake punchline fat fish hypocrite implied punchline inappropriate joke light-bulb long mispronounce monday obama obscure old pessimism pirate plumber portmanteau prank call repetitive self referential spelling star wars stereotype suspended disbelief swearing talking food technology troll untellable violence weird whiplash work your mother 2020 Disney Pavlov Perl accent accident adage advertisement allusion anakin skywalker anti-pun audience participation bald bash beat panel biology blunt booger call and response chemistry clown context covid current events date defeatist delusion difference divorce doge drug duck electrician emo escalation evil cat face bomb faces false dichotomy fantasy fear fickle forgetful fourth wall breaking garbage man generational gesture ghost gif gorillas greedy harry potter hippie historical history idiom immature implication insultnsult jargon lettuce library linguistic macabre made up words media mental disorder mental illness mexico mistake mondegreen name name-calling nazi numbers pain paradox pedantic petty phrase subversion pokemon poker face pretentious prison protests punctuation purple prose rap reverse rhyme roll safe science sickness spanish spiderman spoonerism straight man subversion suicide surreal swear talking objects thinker true twisted tea typo unpronounceable vegan visual who would win winter work humor written only wrong zoo
Show more

More jokes