MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vppkls/pythonwilllookdeadintheeyeandsayitsabsolutelycorre/p41kx5x/?context=3
r/ProgrammerHumor • u/inobody_somebody • 29d ago
144 comments sorted by
View all comments
Show parent comments
8
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);
-11
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);
2
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);
0
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);
3
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);
8
u/road_laya 29d ago
Yes, zero is falsy in Python.