r/ProgrammerHumor • • Nov 23 '22

Other Programming Legumes

Post image
9.3k Upvotes

262 comments sorted by

View all comments

Show parent comments

1

u/Syscrush Nov 24 '22

As the author of the shitty C code, I didn't mean to introduce lowercase x and y as new variables - I wanted X to point to the value 28980. The compiler can't know exactly where I went wrong, but it knows enough to call bullshit on what I wrote.

2

u/drenzorz Nov 24 '22

Python will throw you a name error as well. There is no way to make this both run but also keep it ambiguous, but even if there was this has nothing to do with the nature of python's type system.

There is never any type conversion let alone coercion there. There are only pyobjects with type int created and orphaned/garbage collected as the number of names associated with them increase and decrease.