5 ms·
I don't like Java although I have to use it at my current job. There is simply no other alternative that is both widely known and supported (think a lot of prog
by 0xmarcin 4y ago
I don't like Java although I have to use it at my current job. There is simply no other alternative that is both widely known and supported (think a lot of programmers and a lot of libraries). I see only 2 other candidates C# & Go, switching to either of them means significant effort and temporary performance drop for the entire company.
Java is a very backward language, at my current job we use Lombok to generate boilerplate code. Lombok itself is a compiler hack, I don't like it. Why is that Java 17 records does not have supports for builders or for "withers" (point.withX(3)), C# & Scala offer both of those things. This makes records unusable for most of my use cases.
The other hard miss is lack of named parameters. This either makes code very verbose or less readable.
And my last complain is about lack of support around Futures/async/await. Yes there will be project loom, maybe even in next JVM release but currently we don't have it and a lot of libraries will need at least a year to support it. So instead of await's I have to manually compose CompletableFutures into spaghetti like code. I really hate this. We propose to our architect to use Project Reactor but the idea was discarded (after all Reactive Programming is not very popular among "commodity" programmers).
If I had to start a company now I would probably also pick Java (or Go), my main points would be:
- Free compiler and IDE
- Good library support for wide range of use cases
- Programmers available on the market (Java) or willing to learn (Go)
- Good build system, static analysis tools, best practices, learning materials & stack overflow
- Language is battle tested (sorry Haskell, Ocaml & Lisp)
Yeah this reduces it to Java for JVM, C# for .NET, Go if you are adventurous. If someone pick something more ambitious like Scala 3 or Rust I would gladly join that company, but if it was my own I would not risk it.
- ithrow 4y agoI would add nodejs/Typescript as a mature option by now. Also, for web apps, using only one programming language sounds like a net positive for me.
- jeremycarter 4y agoI'd argue that Java/C# with Typescript is still a reasonable mix to maintain, they're not entirely foreign.
- mike_hearn 4y agoMost of your complaints are resolved by Kotlin, which can be mixed and matched with a Java codebase on a file level.
- ghostwriter 4y ago> Language is battle tested (sorry Haskell, Ocaml & Lisp) do you mean battle-tested by yourself? Otherwise it's kind of FUD opinion, as Haskell is battle-tested across industries in quality-demanding domains[1], and I'm sure the other two have similar lists of industrial application. [1] https://www.reddit.com/r/haskell/comments/6p2x0p/list_of_companies_that_use_haskell/ https://www.reddit.com/r/haskell/comments/6p2x0p/list_of_com...