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

44

u/polaroid_kidd Nov 07 '19

Don't let me reason on your parade, but it didn't really matter if it's in first or fifth place. What I'm trying to say is that you can learn any of the top five languages and land a job (with the bobs and bits that go with being a software developer/engineer)

Personally, I just tried it again after a brief stint in Kotlin and I've come to realise that I really miss the static typing, but then again, I come from Java so I might be a teeency bit biased ^

19

u/[deleted] Nov 08 '19

I come from python and I prefer static typing.

→ More replies (4)

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.

→ More replies (15)
→ More replies (2)
→ More replies (5)

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?

→ More replies (1)

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)

7

u/FlukyS Nov 07 '19

Syntactically Java was never bad in its day but in comparison to Python it's night and day. I do think learning python both helped my C and Java stylistically but learning Java would never help my Python. Add that just better tooling for Python right now and there is really good reason why the language is in demand. C++ needs to watch it's back too.

3

u/thisisshantzz Nov 07 '19 edited Nov 07 '19

Somewhere I feel that Python should have been a strongly statically typed language while maintaining its simplicity of writing style. So many times I had trouble identifying the type of argument that a function takes especially when using third party libraries.

→ More replies (8)
→ More replies (2)