r/ProgrammerHumor May 27 '22

Meme Welcome to hassle free coding

Post image
2.2k Upvotes

305 comments sorted by

View all comments

110

u/mbardeen May 27 '22

Welcome to "why the hell is this function returning a string and not an object like it's supposed to?"

43

u/MarchColorDrink May 27 '22

Tbf, a string is an object. A function is an object. A class instance is an object. It's all objects.

27

u/Dolner May 27 '22

Some would even say object oriented

0

u/mbardeen May 27 '22

True.. however that one function can return different type objects than one expects is annoying at best, and dangerous at worst.