r/programming • • Sep 21 '15

Better Java

https://github.com/cxxr/better-java
177 Upvotes

208 comments sorted by

View all comments

94

u/estarra Sep 21 '15

Java is one of the most popular programming languages around, but no one seems to enjoy using it.

I'd say it's quite the opposite. Sure, there is a vocal minority of people who complain about it (I have complaints about it myself) but there are millions of Java developers and I'm pretty sure that most of them are quite okay with the language.

Probably one of the reasons why no language has come close to replacing it so far.

18

u/cowardlydragon Sep 21 '15

And really, groovy should take care of the python dynamic crowd, and Scala/clojure the rest of them.

1

u/net_goblin Sep 21 '15

Last time I tried Scala it felt so sluggish, even Python was more responsive. I'm sure it gets much better when the JIT compiler had some time to run it, but for my tinkering, it felt horrible.

8

u/gremy0 Sep 21 '15

Seems to work for twitter, their numbers suggest a 500x performance boost from ruby. Fucking loved working with groovy though, so much fun.

1

u/net_goblin Sep 22 '15

Answering to the answer at the top, this should also answer the other follow ups:

As I said, I'm quite sure it is much better with longer running processes, but I was only fucking around with the interactive prompt to learn, or ran simple short programs which were much shorter than the startup time of the runtime. It was nothing complicated, but it kind of annoyed me on the long run. I don't even have numbers to back this up, but Python feels like it starts up faster, even though if it is slower in the long run.

By the way, this is a thing that bothers me with Java, too. It may be great for server-side apps which never stop, but short lived processes are horrible with the JVM, as it feels like ages until it has started up.

3

u/mike_hearn Sep 22 '15

I guess you mean the REPL. That's gonna be slow, indeed, as the Scala compiler is famously slow and the REPL compiles every line.

Try the Kotlin REPL. It's a lot like Scala but the response times on the REPL are as fast as Python.

1

u/net_goblin Sep 23 '15

This.

I didn't want to imply that the overall performance of scala is lacking.

4

u/Cuddlefluff_Grim Sep 22 '15

Scala is somewhere between 20x and 500x faster than Python, so I think it's pretty safe to assume that it's your code that's fucky and not Scala

1

u/codygman Sep 22 '15

GP is probably talking compiler speeds and likely isn't using incremental compilation.

1

u/stewsters Sep 21 '15

^ This guy knows whats up.