DEV Community

Discussion on: Why all this hate about Python?

 
evanoman profile image
Evan Oman

Wow, the more I read this site the more I want to take on the Java evangelist role. Haven't come across a single advocate, only hate.

Thread Thread
 
shacham6 profile image
Shacham6

I like Java! I really do. I certainly like it more (god, so much more) than Python

Thread Thread
 
aghost7 profile image
Jonathan Boudreau

I'm not "hating" on the language, I've just stated my preference of python over it because of its type system.

Thread Thread
 
aghost7 profile image
Jonathan Boudreau

I remember when I was learning Java that I had to use upcasting (some of the nio apis, etc). Whats the point of a type system if you're upcasting?

Thread Thread
 
evanoman profile image
Evan Oman • Edited

@aghost7 you are absolutely right, I have just noticed a general lack of enthusiasm and happened to mention in reply to your comment, which was not hateful. I apologize.

For upcasting do you mean implicit upcasting? We typically do that in order to "program to an interface" which helps facilitate a clear separation between the implementation of a module and how it interacts with other modules (ie loose coupling).

Thread Thread
 
aghost7 profile image
Jonathan Boudreau • Edited

Sorry, I think I meant downcasting. I've had to use this on several occasions when I was writing Java. I think the worst I've encountered in the standard library is casting object to something else.

Thread Thread
 
evanoman profile image
Evan Oman

Hmm, yeah usually you want to avoid downcasting at all costs (most Java devs consider it a code smell). Java is certainly far from perfect but Java 8 and 9 make it muuuuch nicer to work with (especially if you like Scala).

Thread Thread
 
aghost7 profile image
Jonathan Boudreau

If you're referring to streams I'm afraid that there's still some catching up to do (based on the last time I looked at it) when compared to Rust or Scala.

Thread Thread
 
evanoman profile image
Evan Oman

Streams, Optionals, Futures, Method References, and Lambdas everywhere are all great additions but it definitely lags behind Scala in some ways (never tried Rust).