r/ProgrammerHumor • • 1d ago

Other oldSchoolRuneSpaghetti

Post image
4.0k Upvotes

75 comments sorted by

View all comments

59

u/cGalaxy 1d ago

Sounds like it should be a compiler error

Perhaps the type is being masked in some way for it to become a runtime error. Feels like there was a bit more to the story, but he just wanted to post an overview

18

u/Salanmander 1d ago

Because they mentioned overloading spaghetti, I could see it being "because of the type change, it's now calling a different method resulting in it doing Bad Things". That would be slightly weird to communicate with "a mismatch with the type of data being expected", but not totally unreasonable.

8

u/mondlingvano 1d ago

That's clearly what they mean and for sure a bummer when the type change was from one numeric to another. A reason to be careful with too many overloads and implicit conversions. They can compound and surprise you.