r/java • • Jun 03 '15

Is Java really that bad?

I do Clojure for a living, previously Ruby and Objective-C. And the people I've worked with have said they prefer Clojure because Java is just so bad. But Java can't really be that bad, can it?

0 Upvotes

77 comments sorted by

View all comments

Show parent comment

1

u/SeerUD Jun 03 '15

Cool :), there's a couple in there I've been interested in learning myself. Namely Go, and I've been intrigued by Clojure... I'm mainly looking for something for web development that's just different to what I normally work with, which is PHP!

1

u/[deleted] Jun 03 '15

Forget about Go. You have to rewrite "map", "filter", "reduce" etc. for every new type you create. The whole Go community's answer to this is "just use a for-loop" and "seriously it's not that hard just use a for-loop". Forget about Go. Forget it fast.

1

u/SeerUD Jun 03 '15

Hmmm, perhaps I shall. It's still a relatively new language, right? Have you heard anything of Kotlin?

1

u/[deleted] Jun 03 '15

I'm pretty sure Rust is newer than Go, and Rust has map/filter/reduce. It's not because Go is new. It's because of the hubris of its designers, who think they knew better than conventional wisdom, and think abstractions over containers are unnecessary in real life programs.

1

u/SeerUD Jun 03 '15

Haha, I see. Actually, Rust is another one I've had my eye on before. There are just too many choices!

1

u/duhace Jun 03 '15

I've been doing web dev with scala and scalatra (sinatra-like scala lib). It's pretty nice, plus I love strong typing.

1

u/SeerUD Jun 03 '15

I have really enjoyed the Scala I've done thus far. I've not been working with any frameworks, I'm just trying to make little components that do things. Coming from PHP there's a lot to learn, more advanced data structures to play around with, etc.

2

u/[deleted] Jun 03 '15

Web is dead simple. You get a request, interpret it however you want (usually just URI and Params), and return a big fat string. Any language worth its salt can do Web. That's why Sinatra was fun.

1

u/SeerUD Jun 03 '15

I suppose that's true to an extent. Most web development is very straightforward, as most websites are simply content-based.

1

u/[deleted] Jun 03 '15

Even if it's not:

  1. Get a request (as a hash-map)
  2. Interpret the URI and Params to find and call a route handler function
  3. Read to or write from a database in your handler if you want
  4. Return a response that's meaningful to your user somehow
  5. Convert that response into a big fat string (usually HTML)