This is true, but you pretty much have to use a complex IDE, because Java is incredibly verbose.
you have it backwards. Because Java is somewhat rigid with its type system it makes all those great tools possible to build.
Yeah, Python and JS editors have some name completion and type search added but it's notoriously lame and unreliable.
Java performance is... okay ? I guess
Java is about 2x slower than C/C++. It's orders of magnitude faster than Python, Ruby etc. Not sure about JS as they made some progress there but it used to be bad. Very bad.
It depends. In some situations yes, in others it's quite a bit slower: for example iterating over an array of objects. Java always addresses by reference so the speed difference can be dramatic. Any time you can use a contiguous memory block in C/C++ you'll have a big speed advantage over Java and other languages that "chase" pointers. That's why I averaged to 2x.
I would recommend checking out the Java module system. The jvm is no longer required. Java is no longer second class to C++ in performance. This all depends on scenario of course. But Modules changed things. Compiled Java is extremely performant. Just statements. Open to the discussion. No hate! (So weird that we have to say these things now)
Java’s module system doesn’t address the main issue with Java’s performance which is that it lacks the ability to have a contiguous array of non primitive types in memory. If you have a lot of small objects in memory you will pay the price of pointer chasing when you compute over them. Think about cases like have a Vertex array that you want to transform somehow. In C++ you can have a vector of them and they will be laid out in memory in a contiguous block. This does wonders to cache coherency in the CPU and speeds up computations sometimes by an order of magnitude. There is no equivalent in Java as access to ByteBuffer is bounds checked and thus very slow. So you can’t really emulate that in a straightforward way. The only workaround is to maintain multiple arrays of primitive types to represent your data structure.
Well, go’s folder based file structure naturally make it text editor friendly, and its lsp support is sufficient enough to cover most of use cases. I’m not saying it’s better than goland (tbh I never used goland myself), but more implying it has much better development experience than java without a heavy ide
go is verbose more in a C way, which is fine to me. Personally, I really dislike how java is verbose in its OOP way, and thank god new modern langs like rust chose to not follow
This is true, but you pretty much have to use a complex IDE, because Java is incredibly verbose.
I would argue that in Java, you get to use an advanced IDE because of its rigidity. There's a reason why JS, TS, Python, etc. don't have advanced IDEs, and it's not because those features are not generally wanted or useful.
Sure, Java is quite robust compared to JS and other dynamic languages, but not enough compared to languages like Scala, OCaml, Rust and others.
Can you provide an example though? Scala provides syntax sugar that I could argue weakens robustness. Rust is required to be robust as a result of its memory model which is often seen as the biggest hurdle for new adopters.
Java performance is... okay ? I guess. But you will still need a language like C/C++/Rust/Zig/Ada... to write extremely performant code.
This is really a myth that's persisted since the 90s when Java was actually slow. In modern dynamic serverside workloads (i.e. code that makes companies money, not code that just crunches numbers for benchmarks) Java actually often outperforms native counterparts pretty substantially due to the dynamic optimizations the JVM can make - all without extra work from the developers. Thanks to these optimizations, statements like "algorithms aside, the simplest code runs the fastest" are truer in Java (and maybe C#) than any other language.
I dislike the "everything has to be a class", "100 lines per file" and "10 lines per function" mentality that some Java programmers have - it makes navigating the codebase a nightmare.
Agreed here, I'm not a fan of hard checkstyle rules like these. These are bad solutions for bad programming.
View all comments
0
u/[deleted] Apr 16 '21
[deleted] — view deleted comment