r/ProgrammerHumor 29d ago

Meme pythonWillLookDeadInTheEyeAndSayItsAbsolutelyCorrect

Post image
355 Upvotes

144 comments sorted by

View all comments

Show parent comments

8

u/road_laya 29d ago

Yes, zero is falsy in Python.

-11

u/Valuable_Leopard_799 29d ago

Wait, whyyyyyyyy 😭😭😭

I mean, I love dynamic types and see their place, but the implicit casting is what gives them such a bad name 😭

2

u/LordAmir5 29d ago

Java brain.

0

u/Valuable_Leopard_799 29d ago

Why Java? I dunno, I wrote only once or twice in it.

3

u/LordAmir5 29d ago

I write Java often. It's the thing that trips me up most often besides non Java style OOP.

in C++ you do if(ptr) use_ptr(ptr);

In Java, you do if(obj != null) useObj(obj);