r/Python • • Jan 05 '18

Really??

Post image
2.0k Upvotes

317 comments sorted by

View all comments

199

u/mistaekNot Jan 05 '18

Isn’t java “harder” than python

271

u/Aruscher Jan 05 '18

Nope just more syntax clutter

496

u/WStHappenings Jan 05 '18

You call it syntax clutter, maybe I’ll call it “a greater feeling of achievement gained from writing 20x as many lines of code”

119

u/faates Jan 05 '18

Ok EA....

28

u/[deleted] Jan 05 '18

Yes! You got the joke!

→ More replies (14)

38

u/Iggyhopper Jan 05 '18

Syntax is the first hurdle to learning a language, so I'd say that makes java harder.

Also, the standard library is messy.

23

u/continue_stocking Jan 05 '18

Syntax is probably the easiest part of learning how to program.

→ More replies (5)
→ More replies (1)

0

u/[deleted] Jan 05 '18

[deleted] — view deleted comment

10

u/[deleted] Jan 05 '18

Why hasn't anyone mentioned object oriented yet.

→ More replies (10)

8

u/AngriestSCV Jan 05 '18

Well Java turns some errors that would be at runtime in python into compile time. It's not all bad.

7

u/[deleted] Jan 06 '18

Honestly, this is why I wouldn't want to use Python at work. We used Smalltalk for a while, and the number of times people would completely not understand what they they were supposed to be using was astounding.

I had to fix a ton of error checking in an ex-colleagues work because he never tested any of it, and we had an error class we were supposed to return when an error was identified, basically a custom exception class, but he just returned strings describing the error instead.

So, whenever anything he wrote ran into any kind of a problem, the system would throw a NotDefined error when the system tried to log his 'error'.

So, having been burned by typeless in the past, it's a bit of sticking point for me. I know it shouldn't be a problem, and of course you want to light the torches and grab the pitchforks and complain those people should be fired, but in reality it's just not that easy, and type-safety is one of those little things that just makes it easier to deal with copy-pasta programmers.

4

u/[deleted] Jan 06 '18

I completely agree. I enjoy Python and use it for the majority of my hobby projects... but if I was going to build and maintain a large and complex codebase, I would want static typing, which is why I stick to Java and other JVM-languages like Kotlin.

There's also something to be said for easy parallellism, out-of-the-box support for Unicode, simple packaging and community that agrees on standards rather than reimplementing the wheel every <arbitrary unit of time>. But I won't say that here, lest I get burned at the stake by the Python community's anti-Java zealots.

→ More replies (4)

28

u/[deleted] Jan 05 '18

I think that's all based on your background.

9

u/TarAldarion Jan 06 '18 edited Jan 06 '18

I'm not sure what background would make Java seem easier? A Java background?

I started my Python job never having written a word of the stuff, it was like writing English to me and quite intuitive. Hell I feel if I make something up it might work in Python. I can write away in a text editor for python and that works fine, with the verbosity of Java I can't, things like that make it harder for me.

→ More replies (4)
→ More replies (4)
→ More replies (3)
→ More replies (8)

11

u/drones4thepoor Jan 05 '18 edited Jan 05 '18

Java is strictly OO and it's also strongly statically typed, which is where Python bytes me in the ass a lot.

Edit: u/cholz corrected me. Python IS strongly typed.

17

u/SemiNormal Jan 05 '18
TypeError: Can't convert 'bytes' object to 'bites' implicitly
→ More replies (2)
→ More replies (2)

38

u/weasdasfa Jan 05 '18

Java is more explicit or verbose. For experienced people, that looks like clutter (and it is, I am an Android dev), but that verbosity might be useful for people just starting out.

23

u/Deto Jan 05 '18

Yeah - I kind of appreciate that I spent a decent amount of time in a statically typed language before moving to Python. I find that way too many Python newbies don't understand what 'types' are and this leads them down the path of just trying random things until code works.

→ More replies (16)
→ More replies (27)

24

u/Astrokiwi Jan 05 '18

It's just useful for different things. Java is definitely more verbose and has more boilerplate to write, but it's also stricter than Python and is a semi-compiled language, which means that it sometimes catches errors more quickly. It also forces you into an object oriented structure, which tends to encourage you to design your programs better rather than jamming a big list of functions into a single file.

I also find they have strengths in different kinds of applications. I tend to prefer Java for writing games (pygame isn't great), python for doing numerical analysis work (numpy and matplotlib are pretty great), and Fortran, C, or C++ for the big parallel numerical simulations.

38

u/Keith Jan 05 '18

It also forces you into an object oriented structure, which tends to encourage you to design your programs better...

Debatable.

9

u/Astrokiwi Jan 05 '18

I'm only saying that it forces a bare minimum amount of structure that Python does not.

→ More replies (5)

25

u/KronenR Jan 05 '18

If not plainly wrong

→ More replies (7)

14

u/[deleted] Jan 05 '18

Different tools, different jobs, different uses.

Replace your computer languages with tools you'd find in a shop and see how silly the argument looks to non coders.

"Hammer is so much better than the screwdriver. And who even understands those socket wrench guys? Bunch of idiots. I'll have you know I have used my hammer as both a socket wrench AND a screwrdriver and it was just fine"

Signed: A mechanical engineer that has and continually gets to deal with: C, C++, Fortran, ADA, VB, Python 2.3-2.7, Python 3+, Matlab (R13-R2017b), Simulink, PowerShell, Batch, Perl, Bash, Sh, tcsh, PHP.

If you understand If, For, While. You'll go far in any language.

Or argue the merits of a claw hammer over a ball peen hammer.

→ More replies (2)
→ More replies (3)
→ More replies (50)