r/Python • • Nov 07 '19

Python passed Java as the second-most popular language on GitHub by repository contributors

https://github.blog/2019-11-06-the-state-of-the-octoverse-2019/
1.4k Upvotes

158 comments sorted by

View all comments

228

u/__init__RedditUser Nov 07 '19

As someone who never wants to have to seriously learn Java, this is great news

61

u/BigASchw Nov 07 '19

I taught myself primarily in Python but I'm at my first dev job and we use Java. You never want to learn Java, it's the worst

43

u/FishBoyBagel Nov 07 '19

Just curious, why would you never want to learn Java? I’m a freshman in college studying Python this semester and Java next semester.

69

u/[deleted] Nov 07 '19

Java is absurdly verbose compared to python. Granted, it’s faster, but its much slower to write.

28

u/QualitySoftwareGuy Nov 08 '19

Java is absurdly verbose compared to python. Granted, it’s faster, but its much slower to write.

It is, but some might also say it's easier to maintain medium-large sized applications in Java. I love Python, but best tool for the job is my motto.

0

u/[deleted] Nov 08 '19

[deleted]

4

u/Vaphell Nov 08 '19

let's not get ahead of ourselves with "strong types". Strong-ish, maybe. I certainly love losing type information while using generics, courtesy of type erasure ;-)

Checked exceptions? Lol.

→ More replies (1)

8

u/[deleted] Nov 08 '19

Depends on how the project was structured imo, but yes compiled languages are more strict so there are less “what the fuck was the author thinking” moments in maintenance

17

u/[deleted] Nov 08 '19

The problem with java isn't that it is statically typed, it's that it requires absurd amount of boilerplate to do literally anything. And it's OOP model is not good.

3

u/[deleted] Nov 08 '19

Java is pretty fast to write honestly. Long variables names are almost all auto completed. And compared to python I think java is faster to write in some instances, because it requires less testing and checks due to the compiler. Typed python helps a lot there though.

8

u/BigASchw Nov 07 '19

Exactly this, just printing hello world in each language is the perfect example as to why python is so much easier and more enjoyable to write in

44

u/AcousticDan Nov 07 '19 edited Nov 07 '19

I wouldn't judge a language on how printing "hello world" works.

→ More replies (10)

69

u/[deleted] Nov 07 '19

...python is so much easier and more enjoyable to write in

Most languages have strengths and weaknesses. Doing a task in a language it's ill suited for, just because that language is familiar and easy, will certainly be problematic down the road.

Learning Java at least lets one determine if it was the best tool for the task at hand.

1

u/alcalde Nov 07 '19

Doing a task in a language it's ill suited for, just because that language is familiar and easy, will certainly be problematic down the road.

If it's easy to do something in a language, then that language is well-suited for the task by definition.

→ More replies (10)
→ More replies (4)

5

u/1chriis1 Nov 08 '19

Unless, you encounter the stupidest hickups for a small indent. Love it though!

4

u/nemec Nov 08 '19

When your application is 300,000 lines of code it doesn't tend to matter much how long a "hello world" program is in comparison.

Sure, it sucks for a beginner, but presumably you won't be a beginner forever...

Java sucks though for other reasons

2

u/pwang99 Nov 07 '19

It’s not faster for a huge part of what people use software for, namely, large data processing (data science and machine learning)

→ More replies (4)

12

u/[deleted] Nov 07 '19 edited Nov 08 '19

Java isn’t bad. It’s verbose but extremely performant. It doesn’t cross over into “awful” territory until you start applying 20+ years of enterprise “patterns” to everything you do and you start contemplating stepping in front of oncoming traffic on a regular basis.

4

u/niceoutfive Nov 08 '19

In my experience, Java is more pedantic. You have to do it their way or the highway. Python is more easy going. You can do basically all the same stuff, but with fewer rules. In Java you have to write getters and setters (like user.getName()). But in Python you just say user.name.

Python gets it done with little hassle, Java gets it done but only if you recite the proper incantation during the right moon cycle while you write it. But it is pretty solid once you learn the arcane arts!

(Caveat: I know Java only in an educational environment, so we were being taught the "proper way." I'm sure that that is way more pedantic than when it is used for real development. Buuut, seeing some actual production Java code at my company, that appears to be the norm. You can get just as structural with Python too!)

You should very much learn Java though. If you know Java, you can figure out the other bad boys like C and C++ a lot easier. If you already know Java, congrats you now know probably 90% of C#. If you want to ever do Android development, you'll need Java (although Kotlin is also getting very big in that field)

→ More replies (7)

7

u/lordmyd Nov 07 '19

Just out of interest how much willingness is there to substitute Kotlin for Java at your workplace?

10

u/[deleted] Nov 07 '19

GoLang is fun.

20

u/foobarfault Nov 07 '19

Until you have to figure out where in the stack an error actually came from...

Still my favorite language

3

u/ollien Nov 08 '19

Error wrapping helps a lot, but agreed, it could be better.

→ More replies (1)
→ More replies (3)