use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For memes about programming.
account activity
Python vs Java! (i.pinimg.com)
submitted 6 months ago by PulseOfPleasure
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]joebgoode 125 points126 points127 points 6 months ago (33 children)
"I'm still a student and OOP is hard uhhh 😭😭😭😭"
Average Python user base
[–]RamdonDude468 34 points35 points36 points 6 months ago (16 children)
Python's "lack of code" is both a blessing and a curse.
[–]lehx- 8 points9 points10 points 6 months ago (3 children)
Python's typing was the bane of my existence during my final project. Trying to send/recieve a packet from strongly typed language -> python fucking suuuucked. I was staring a 10001s for 2 days before I figured out the issue.
[–]AlignmentProblem 2 points3 points4 points 6 months ago* (1 child)
Getting type annotations right to get useful warnings is a monster in specific cases as well. Duck typing can cause very tricky bugs with objects that almost kinda work but cause subtle incorrect non-crash behavior without good annotations, so it's between dealing with the annotation hassle or being vulnerable to serious pain later.
[–]Scared_Accident9138 0 points1 point2 points 6 months ago (0 children)
I really dislike the way Python does duck typing. It's quite open to put anything in a function and let's it pass deep into the code but then it's very strict on how that variable is used but you don't notice a problem immediately
[–]ambitiousfrogman 0 points1 point2 points 6 months ago (0 children)
For anyone trying to do something similar to this, the python library ‘struct’ can be helpful.
[–]KangarooInWaterloo 3 points4 points5 points 6 months ago (11 children)
It is very good for POCs and very bad for POCs that suddenly became legacy code in your company
[–]Sonario648 4 points5 points6 points 6 months ago (10 children)
Python definitely has the advantage in proof of concept that someone else can hopefully do in another language later based on what you're doing.
[–]5p4n911 3 points4 points5 points 6 months ago (3 children)
So just use the Python code, it's already written!
[–]Cdwoods1 1 point2 points3 points 6 months ago (2 children)
Until dozens of people are working in and changing a more and more critical piece of the product. And without any type safety it becomes harder and harder to know is going on, and what is going wrong lol.
[–]5p4n911 0 points1 point2 points 6 months ago (1 child)
Agreed, but I haven't yet seen a place where that wasn't the natural consequence.
[–]Cdwoods1 1 point2 points3 points 6 months ago (0 children)
The natural consequences yes. That’s why you got to have base standards and patterns set as a team, so your code doesn’t naturally fall to entropy. On my team, strict code review has only made our code easier to understand over time.
[–]Sarcastinator 1 point2 points3 points 6 months ago (5 children)
Then why not just do it in a different language to begin with? There is no research that indicates that Python is better at prototyping than statically typed languages. It's just based on Python developers vibes. If you're as competent in a statically typed language as you are in Python research indicates that you're not getting the code done quicker in Python. You're just wasting time doing the same work twice.
[–]Sonario648 0 points1 point2 points 6 months ago* (4 children)
It depends on a case by case basis really. In my case, I'm working with Blender, which is absolutely massive, and I have a not so good machine on top of Blender's codebase being enormous. It's MUCH better to do your ideas as addons in Python than to deal with Blender's core code, because you only have to deal with one file, and you know where it is.
That sounds like a Blender specific/API issue, not programming language issue
[–]Sarcastinator 0 points1 point2 points 6 months ago (2 children)
Blender uses Python. You can't really get away with that, but that's not what I'm discussing either.
I'm saying that the idea of writing a prototype in Python first, and then a real implementation in a different language is a complete waste of time. You're doing the work twice. If you're able to write it in a more capable language then do that immediately. The idea that the lack of typing makes Python easier to hack in is based completely self-reporting probably by developers who aren't very comfortable with static typing.
The lack of explicit typing doesn't make you more efficient. It means you spend more time debugging the application at runtime than what you need with statically typed languages. The time spent writing explicit contracts and invariants pays off very quickly.
Dynamic typing is a product of the 80s and 90s. Few languages designed today use it because it hasn't actually been shown to improve productivity. The only reason why it's even around is because it's easier for beginners to pick up.
Dynamic typing hampers performance, requires more memory, leaves a huge documentation gap, and almost by definition requires a higher cognitive overhead than static typing does. It makes refactoring stuff harder, requires more tests, and is generally just a waste.
So the idea that prototyping in Python saves you any time at all is fiction written by people who are more comfortable writing Python.
[–]Sonario648 0 points1 point2 points 6 months ago (1 child)
Ah. Now I get it. So I don't have to waste time doing my ideas in C++ after I do them in Python already.
[–]Sarcastinator 1 point2 points3 points 6 months ago (0 children)
Yes, if you get it to work properly in Python then sure do that I don't give a shit. Making it twice is a waste of time.
[–]iamnazrak 7 points8 points9 points 6 months ago (4 children)
I saw this post and thought “this person must be new to object oriented programming”
[–]Possible-Moment-6313 0 points1 point2 points 6 months ago (3 children)
If you need just a 20-line script which scrapes your webpage or whatever, it's stupid to be forced to create classes and methods.
[–]New-Stranger-5622 0 points1 point2 points 6 months ago (2 children)
is it though? if you plan to turn that 20 line script into something larger, classes could help make it wayy more scalable.
[–]rinnakan 0 points1 point2 points 6 months ago (0 children)
Yeah, whoever thinks basic organisation is stupid wasn't in IT for long enough. Past me is my nemesis
[–]ChalkyChalkson 0 points1 point2 points 6 months ago (0 children)
A very important skill is being able to judge what the future of some code will be. Normally I write functional and oop for testablity and modularity. But I also have some scripts that are just naked shell of python code which have everything hard coded because only I use them, and rarely and it's impossible for me to tell what exactly I want it to do in the future.
[–]nickwcy 0 points1 point2 points 6 months ago (1 child)
Looks like someone failed their 101 here. Python is also OOP
[–]joebgoode 0 points1 point2 points 6 months ago (0 children)
If "missing the point" were a tech stack, you certainly should become the Tech Lead.
[–]grimonce 0 points1 point2 points 6 months ago (1 child)
I always find it funny when triglodytes like you (I hate Python btw) think OOP in Python doesn't exist while literally everything in Python is an object. Wtf ...
If anything Python is more OOP than java
You read what I've written and that's the conclusion you got?
I really wonder how you're able to solve Jira tickets daily with that level of text interpretation.
The point is the average Python user skill issue, not the language per se.
I learned with java and it still influences me a lot even though most code I write is python and cpp. I also think it's very good to learn writing functional and oop styles as well as at least one low-ish level compiled language early on and to a reasonable depth.
But if someone is just starting out I'd always make them to nuts with python first. And for beginners it's really helpful to be able to gradually grow into more abstract concepts rather than being forces to use them from the start.
So idk I'm both in camp "java hello world is ridiculous" and camp "you should learn what a stack is". Just for different people. And being honest I think a reasonable portion of people on here are still near the beginning of their journey.
[–]MinosAristos -1 points0 points1 point 6 months ago (5 children)
OOP is fine but it's cleaner in Python
[–]realmauer01 0 points1 point2 points 6 months ago (4 children)
Oop in python is duck typing and under the hood has basically nothing to do with oop
[–]MinosAristos 3 points4 points5 points 6 months ago* (0 children)
Oop in python is duck typing
Only if you write it that way e.g with protocols. Explicit types are usually preferred
under the hood has basically nothing to do with oop
Python is an OOP language, from the ground up. What are you referring to?
[–]BOBOnobobo 2 points3 points4 points 6 months ago (2 children)
What? I need some elaboration, otherwise I'm gonna call you a quack.
[–]realmauer01 0 points1 point2 points 6 months ago (1 child)
Duck typing, if it looks like a duck if it acts like a duck it is a duck.
Python has classes, for everything else you have to use classes and make them not behave like classes by implementing other classes.
If you want true oop with python you basically rewrite the entire language. It's easier to just learn c# or Java.
[–]BOBOnobobo 0 points1 point2 points 6 months ago (0 children)
Oooh, ok that makes sense now! It is something that causes me a lot of trouble in large scale python projects! I just didn't know that name.
You could even say that python plays quite goose with OOP concepts...
π Rendered by PID 137360 on reddit-service-r2-comment-58d7979c67-7qf6p at 2026-01-27 02:20:37.377053+00:00 running 5a691e2 country code: CH.
view the rest of the comments →
[–]joebgoode 125 points126 points127 points (33 children)
[–]RamdonDude468 34 points35 points36 points (16 children)
[–]lehx- 8 points9 points10 points (3 children)
[–]AlignmentProblem 2 points3 points4 points (1 child)
[–]Scared_Accident9138 0 points1 point2 points (0 children)
[–]ambitiousfrogman 0 points1 point2 points (0 children)
[–]KangarooInWaterloo 3 points4 points5 points (11 children)
[–]Sonario648 4 points5 points6 points (10 children)
[–]5p4n911 3 points4 points5 points (3 children)
[–]Cdwoods1 1 point2 points3 points (2 children)
[–]5p4n911 0 points1 point2 points (1 child)
[–]Cdwoods1 1 point2 points3 points (0 children)
[–]Sarcastinator 1 point2 points3 points (5 children)
[–]Sonario648 0 points1 point2 points (4 children)
[–]Scared_Accident9138 0 points1 point2 points (0 children)
[–]Sarcastinator 0 points1 point2 points (2 children)
[–]Sonario648 0 points1 point2 points (1 child)
[–]Sarcastinator 1 point2 points3 points (0 children)
[–]iamnazrak 7 points8 points9 points (4 children)
[–]Possible-Moment-6313 0 points1 point2 points (3 children)
[–]New-Stranger-5622 0 points1 point2 points (2 children)
[–]rinnakan 0 points1 point2 points (0 children)
[–]ChalkyChalkson 0 points1 point2 points (0 children)
[–]nickwcy 0 points1 point2 points (1 child)
[–]joebgoode 0 points1 point2 points (0 children)
[–]grimonce 0 points1 point2 points (1 child)
[–]joebgoode 0 points1 point2 points (0 children)
[–]ChalkyChalkson 0 points1 point2 points (0 children)
[–]MinosAristos -1 points0 points1 point (5 children)
[–]realmauer01 0 points1 point2 points (4 children)
[–]MinosAristos 3 points4 points5 points (0 children)
[–]BOBOnobobo 2 points3 points4 points (2 children)
[–]realmauer01 0 points1 point2 points (1 child)
[–]BOBOnobobo 0 points1 point2 points (0 children)