58
u/masterflappie 17d ago
Oh good, next time the client orders an app that prints a single hardcoded sentence to the console I'll definitely choose pythonÂ
4
u/Scharrack 17d ago
Frankly in that case I'd probably go with JavaScript as I can be reasonably sure the customer now's how to open a browser but might have problems installing a runtime environment.
5
22
u/Tuborgat_nylle 17d ago
The python one should be the one with all the unnecessary gear. And a simple C printf would fit much better with the stripped version.
3
u/DescriptorTablesx86 16d ago
Had the same thought. Both Java and a python are pretty heavily equipped.
The guy on the right should be Chris Sawyer writing Rollercoaster Tycoon in asm nearly alone.
110
u/Anon_Legi0n 17d ago
Python devs are really insecure about their normie programming language
-11
u/tigrankh08 17d ago
Dogmatist programmers are really insecure about their needlessly complicated syntaxes and can't see the merits of both Python and [insert random uncarefully-designed C-derived language name here]
1
u/ohYuhtBoutMagine 14d ago
Itâs not needlessly syntactic, Python is just abstracting the syntax away. It converts to C. Dictionary? Just a hash table in C
1
u/tigrankh08 13d ago
Python is translated to bytecode interpreted by C code in the case of CPython. C is translated to Assembly, which is translated to machine code. So maybe use Codon? It's a Python-like language that's normally compiled rather than interpreted. Many developers who start with C get confused about what pointers do, yet those who start with Assembly rarely ever find themselves in that situation. So really, we all should start with Assembly? Or maybe we should start with machine code to never get confused about opcodes? What even is the point you're making? You're just regurgitating a point said by many that makes no sense.
1
u/ohYuhtBoutMagine 13d ago
Because syntactically better and just an abstraction are two different things
1
u/tigrankh08 13d ago
Yes. Although be careful with the wording here, because languages basically are abstractions in and of themselves.
However, again, yes, requiring the entry point of the program to be defined in a function defined in a class (a la old Java), vs. code entirely constituent of the entry point being valid syntax in a given language (a la Python), absolutely is an arbitrary choice.
-6
-19
u/REDthunderBOAR 17d ago
Almost like they do different jobs. Python being a C++ offshoot.
24
u/Luk164 17d ago
More like wrapper
7
u/Obmanuti 17d ago
C++ offshoot is crazy lmao. Wrapper is generous enough.
1
u/cheese_master120 16d ago
Idk why people make such a big deal of Python using C under the hood. As far as I'm concerned, C uses ASM under the hood so wouldn't that make C a ASM wrapper as much as Python is a C wrapper?
2
1
1
72
u/Sage_With_A_Letter 17d ago
Do a for loop without numpy and let me know how that goes lol.
22
2
-6
u/Willing_Parsley_2182 17d ago
Your joke: âIf you donât use the best practices / features of a programming language to make it worse, then that language isnât very good⌠GOT EEMâ
Well, duh? Isnât the Java JIT mainly C++? âTake out the JIT compiler and then write a for loop and let me know how that goesâŚâ
14
u/Obmanuti 17d ago
I think you missed the point. Of which there are many, one being that the things that make python easier to use are made easier because they are hidden from you. Either through requiring a library thats probably written in something else since python is abysmal performance wise, or because natively the language abstracts it away. In some ways the image should be reversed, python is the language with all the assistance and abstractions. Both languages use another language to help, but they do it at very different levels and youre comparison above is pretty silly as a result.
-6
u/Willing_Parsley_2182 17d ago
Youâre proving the exact point youâre trying to criticise.
Every language abstracts things away. Java abstracts memory management and JIT compilation. C++ abstracts assembly. Assembly abstracts machine code. Thatâs literally how software engineering works⌠layers of abstraction. Itâs also strange to insinuate Python is uniquely dependent on libraries when C++, Java, Rust, Go, etc. all heavily rely on libraries too. Boost exists for a reasonâŚ
If I need threading, or maximum performance everywhere, Iâll use C++. Otherwise, Python does the job in most cases. Itâs undeniable Python has grown massively while Javaâs popularity has generally declined relative to newer ecosystems. Why is that?
Donât worry, youâre still very clever and âPython badâ. Good job.
7
u/Obmanuti 17d ago
Oh I love the popularity argument! The classic....
I would agree, something being easy to use, especially for those outside the domain like data scientists, does in fact lend itself to being popular.
The good news is, its also totally irrelevant. Ive seen this meme god knows how many times over the years. And yet, there Java goes still running on billions of devices.
Python is easy to use, I use it on occasion myself for ductaping shit together. Its great for that. But im not going to pretend its equivalent to any of the languages designed for large scale high performance applications. And the tired joke that implies superiority because it can print hello world easier gets old. I cant remember the last time I needed to print hello world in a real application. I can however remember the last time I needed to write a high throughput backend service that leveraged concurrency in a serverless environment with complex data modeling and access patterns. Something that even if python could do (maybe they've made a c lib for it I dunno) it shouldnt.
Its okay that python is good at certain things and not at others. Its stupid to compare it to a language that serves an entirely different audience and purpose.
-5
u/Willing_Parsley_2182 17d ago
3 arguments made there, you focussed on one which was a minority point, then basically reversed your whole narrative in the last paragraphâŚ
Whatever, you have a weird obsession with Python for arbitrary reasons. Nothing Iâve said has been meaningfully challenged.
6
u/Obmanuti 17d ago
Because it feels like Im arguing with an intern. If you cant see how pythons library dependence is meaningfully different. Im not going to convince you. If you cant see how theres a difference between building on top of a language i.e. C++ using C or the Java compiler using C vs importing a C library that python can then run, theres nothing I can say to convince you.
You contend that python does the job in most cases. Maybe thats true for you. And if so, great! Im glad you found a language that meets your needs.
The vast majority of the software engineering world is not so lucky. For some, if not most, performance matters, organization matters, type safety matters, compute cost matters. Most senior devs that I know would not build an enterprise application on python. If you would, I wish you the best.
My narrative hasn't changed at all, Java as verbose as it is, has persisted for a reason. Python has become popular for a reason. These memes are stupid, and drastically oversimplify the comparison.
My error here is engaging in good faith and assuming you would do the same. You want to be right, youre not interested in being correct.
-3
u/Willing_Parsley_2182 17d ago edited 17d ago
Read the actual words that have been written. Original commenter: âwithout imports Python badâ. Me: âThatâs meaningless as it does have importsâ. You: âAkshuallyâŚâ
Youâre having an argument with yourself. Nobody criticised Java. On performance, youâre rehashing what I said (that Iâd use C++ over Python if I needed performance).
Youâve not entered any new information, meaningfully challenged any of the assertions, and youâve misconstrued what has been said.
7
3
u/Sage_With_A_Letter 17d ago
Itâs funny because this whole time you still donât get it. Iâm not saying imports are bad. Iâm saying a dynamically typed language with a JIT interpreter will always have issues. Look at the assem output and how much shit is between simple add calculations. The only reason numpy works as well as it does is because it effectively introduces types back in. If pythons performance works for you, great. But it doesnât for many.
To address the c++/c comment. If you really knew c or c++, you wouldnât add in for performance. You would just program in that language. The reason you use Python is because you donât. You proclaim much about software while knowing very little about it.
1
u/Willing_Parsley_2182 17d ago
To be clear: Iâve not once bashed Java. If youâre programming an app or an IDE, itâs clearly one of the best choices.
However, Iâm laughing at your âdonât know C++â comment, as itâs clear youâve not used the ecosystem from your reply:
- 99% of organisation arenât coding their REST API interfaces with C++, which is why you donât use it for everything. Even Netflix uses Python Flask APIs all over the place (and Java too).
- You also donât want a small feature taking 3 weeks to develop over 1 week in Python, if you donât need to save that 50ms.
- When needed, write a library and integrate it with Pybind. Thatâs been the accepted pattern for years. Thatâs where all my heavy pricing logic lives.
- As a use case: Large scale vectorised columnar operations on tabular data. Using Polars in Python (Rust-based but still) will usually beat Java performance-wise for large operations on a dataframe. Itâs open source and rust/based so optimised for these workloads. Reinventing in Java will also take a long time. You get this performance game using Python ecosystem out of the box.
The arguments you used is a strawman and ad-hominem, as you donât understand the use cases or trade-offs.
Regardless of all the above, most enterprise Data Engineering teams predominantly use Python. The premise Python canât build high performance distributed systems is observably false.
At its core, the lack of wider ecosystem knowledge this sub has shown makes me think theyâre siloâd in their roles, abstracted from the business and likely low impact. Also, the inability to comprehend and process the words/ arguments (whilst they repeat the same ones), shows itâs not worth continuing dialogue.
→ More replies (0)3
u/LifeIsAnAdventure4 16d ago
Bro, Java pays the bills.
0
u/Willing_Parsley_2182 16d ago
Very true! Iâm honestly more confused why people think I hate Java, haha. Itâs a versatile and very performant language. The JIT compiling is amazing and JVM has progressed well.
Why is everyone assuming I think Java is bad?
14
u/my_new_accoun1 17d ago
Python is wrong
```python
!/usr/bin/env python3
def main() -> None: """ Prints hello world. """
print("Hello world")
if name == "main": main() ```
-4
u/NichtFBI 17d ago
No, it isn't. You don't need to be doing all of that in a notebook which most of python is being ran.
8
21
u/Sol_Nephis 17d ago
Java and it's clear superior C# can both do one liners now.
10
u/Luk164 17d ago
Except any serious project quickly switches back to the full syntax. It is good for first timers though
2
u/Devatator_ 16d ago
Not really, it's really useful for small stuff. I typically use it for C# scripts (
dotnet script.cs) since they're all single files (and it uses top-level statements by default)1
u/Sol_Nephis 17d ago
Generally. I still use top level statements but if it's a single file project I'll use .NET 10s single file scripting.
7
u/AibofobicRacecar6996 17d ago
I'll keep that in mind when I'll get a job at the Hello World company
12
u/Helen83FromVillage 17d ago
I thought in Java 17+, you could do the same on lines.
And of course, it is strange using Java when we have Kotlin.
5
u/Skepller 17d ago edited 17d ago
Java 17+ reduced boilerplate, but even better, in Java 21+ (preview) or 25+ (standard) you can use Java for single-file scripts like Python (simply run with
java file.java)You don't need to declare a class, just a 'dry'
main. Like this:
void main() { println("Hello, World!"); }1
u/Sufficient_Risk_8127 17d ago
what is Kotlin, a deez nuts joke?
3
u/Helen83FromVillage 17d ago
https://en.wikipedia.org/wiki/Kotlin
Second language support by Spring, primary language for Gradle scripts and primary language for Android.Â
4
u/Sufficient_Risk_8127 17d ago
so it's Java++
2
1
-5
u/App1e8l6 17d ago
Whatâs actually running Java anywhere near that version though?
3
u/Skepller 17d ago
Most things, as its literally the most used version lmao
It'll be overtaken (if it hasn't already) by the newer Java 21 this year. The Java release adoption problem is much less of an issue for a while now.
3
u/shamshuipopo 17d ago
lol everything in production on critical systems I have touched in the last 2 years
2
1
u/Devatator_ 16d ago
Only actual Java codebase I've touched is Minecraft and Mojang does keep it up to date quite well. The current version uses Java 25. My main version (1.21.1) uses Java 21
-8
4
6
10
u/MinosAristos 17d ago
As a frequent user of Python, I'll almost always just do the if __name__ == "__main__:" these days. It's nice not to have functional code dangling in the module scope.
5
4
u/itemluminouswadison 17d ago
Yet, python code is consistently worse written than Java. Dict abuse everywhere
2
u/TheOwlHypothesis 16d ago
It's because the "weird trick" to pass a lot of popular Leetcode problems is a dict.
1
3
2
u/BoRIS_the_WiZARD 17d ago
Shouldn't be reversed since python does everything for you compared to Java?
2
1
u/why_so_sergious 17d ago
I dislike python because there's always some dependancy that fucks it up somehow.. python, py3, pip, pip3, conda and all that dependancy hell
1
u/AcolyteNeko 17d ago
python: allocate a module allocate a context allocate a string call the print function deallocate string deallocate context deallocate module
C: puts("hello world");
đ¤ˇââď¸
1
u/Simple-Olive895 17d ago
public c + tab
p + tab
sout Hello World!
Is all you have to type for the Java code. Also yeah comparing one line of code in a language with no boiler plate vs one with boiler plate is gonna make it look like a massive difference.
1
1
1
u/Outrageous-Machine-5 16d ago
You're joking, right? Do you know how much magic is happening beneath that one liner
1
1
1
u/gay_annabeth 16d ago
... pretty sure java can be that short now too? I think? Or maybe that was an upcoming thing, idk
1
1
u/No-Whereas8467 16d ago
So am I supposed to laugh? Haha so funny? Do I do it correctly?
Search for Compact Source Files and Instance Main Methods and spend more time in making a meme instead turning off your brain and keep repeating old boring things.
1
1
1
u/neoverdin 15d ago
Nah man, no one is stopping me and my homies from writing mystandardOutputHelloWorldSingletonFactoryListener in Java.
You guys seeing this?
1
1
203
u/LimpRepresentative11 17d ago
r/firstweekcoderhumor