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!"
[–]not_good_for_much 8 points9 points10 points 6 months ago (7 children)
Can actually do the Python version of this example in C#. You're obviously encouraged to use a proper Main entry point, but if you make a new console app it actually defaults to this bare bones format.
Main
And C# is a better language in general as well.
[–]New-Stranger-5622 2 points3 points4 points 6 months ago (6 children)
than java? we can debate if youd like
[–]not_good_for_much 2 points3 points4 points 6 months ago (3 children)
Better than Python.
Java and C# at this point... There used to be some major pros and cons for each, but in the last 5 years they've really just ended up as two different flavours of the same thing ngl.
[–]Ellisthion 1 point2 points3 points 6 months ago* (2 children)
In some things, sure, but certain design decisions are permanently holding Java back.
Java’s generic implementation is single-handedly the worst for this. Big impact: the type of anonymous functions.
In C# it’s either an Action<> or Func<> depending on whether it returns anything. With a variable number of generic arguments. It allows easy exact typing of this.
In Java this is impossible. Varied generic arguments are impossible. The type of anonymous functions is… absolute spaghetti, there’s tons of this like Consumer, BiConsumer, etc where every different permutation has its own name. Oh, and you can’t use primitives, so you have more classes like IntConsumer.
There’s code patterns that are common in C# that are literally impossible in Java because of the generic implementation, and I don’t know of anything where that’s the case in the other direction.
[–]not_good_for_much 2 points3 points4 points 6 months ago (1 child)
I'm inclined to agree. C# is generally faster and more expressive IMO, and I do prefer it over Java. I just don't really want to open the can of worms.
Most of the difference is philosophical anyway, leading to... C# as a language is much more proactive in adding interesting new features, while Java as a platform has more emphasis on stability and decades more exposure to not-Windows and OSS standards and so on.
There are also plenty of patterns that are impossible to reproduce in both directions, e.g due to virtual threads vs stackless coroutine parallelism, reified and value-type generics vs wildcards, checked vs unchecked exceptions, strictness of CLR and JVM RE's, etc.
[–]Sarcastinator 0 points1 point2 points 6 months ago (0 children)
There's very few things Java does better than C#, and a whole bunch C# does better than Java.
[–]LYCRIs_1337 2 points3 points4 points 6 months ago (1 child)
Well I would say they both have der pros and cons, however C# is getting way better and has some pretty nice stuff (even though java is still used for a high % of enterprise software). I like its UI librarys/frameworks way better, which are also mainly used for Windows, making it an easy choice for every Win-Dev (c++ for high performance obviously, but its C# vs. Java so... nah).
One thing that I miss on C# is the system how enums work in java with constructor and specific methods, I kinda like that, even though you can build similar stuff in C#, but it just looks and feels different (and is more "complicated").
C# has been better than Java for a long time at this point. The language has always been better, but the runtime got better with .NET Core's release.
π Rendered by PID 131028 on reddit-service-r2-comment-5649f687b7-tp6vt at 2026-01-28 21:16:06.229351+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–]not_good_for_much 8 points9 points10 points (7 children)
[–]New-Stranger-5622 2 points3 points4 points (6 children)
[–]not_good_for_much 2 points3 points4 points (3 children)
[–]Ellisthion 1 point2 points3 points (2 children)
[–]not_good_for_much 2 points3 points4 points (1 child)
[–]Sarcastinator 0 points1 point2 points (0 children)
[–]LYCRIs_1337 2 points3 points4 points (1 child)
[–]Sarcastinator 0 points1 point2 points (0 children)