r/AskProgramming • u/ur_nighmare • May 23 '26
Python or Java
im in my last year and figuring out which programming lang is for me but confused betn java and python i love both cause im comfortable with both but want to focus on one which one of them is best suited in future too.
things i know: python is readable and easy than java
python is used in ai because of its simplicity
java is suitable for secure appln(banking sys)
5
Upvotes
View all comments
Show parent comment
1
u/Sprinkles_Objective May 23 '26
Multiprocessing is kind of a different beast, they do try to make it feel like multi threading, but at the end of the day each process has its own memory. Honestly most people just need or want concurrent IO, and python's asyncio does really well at that. The thing is trying to learn multi threading using pythons multiprocessing isn't going to really teach you what you need to learn. You won't have access to common synchronization primitives, and you'll have to deal with the fact that you are either explicitly sharing memory or communicating across queues.
Once you get into writing things like C or Rust bindings because you need speed or simply need lower level access, such as interactions with hardware, then you might very well end up needing to know how to properly implement multi threading. I know a lot of senior level engineers who can't explain what a condition variable is, even more who can't explain what atomic operations are or how to use them, many people just know what a mutex is and often don't really consider things like lock contention. In this day and age people should be learning proper multi-threading, and I don't think you'll learn these things in Python.
This isn't in any way me slamming python, I just don't think it's going to be as good of a learning experience. Python was one of my first languages, and I gravitated towards it for everything because it was easy, but it ultimately kind of held me back from learning different ways to solve problems and learning some of the fundamentals of things like multi threading, or systems programming.