4 ms·
Welcome to Java, where Collections are the bread and butter of every programmer since 1998. While you are at it, I humbly suggest to add composable streams too
by kamma4434 2mo ago
Welcome to Java, where Collections are the bread and butter of every programmer since 1998.
While you are at it, I humbly suggest to add composable streams too, that we had in 2014, and that make working with collections way more pleasant.
(Jokes aside, in Java it is very nice that you can start with a generic ArrayList and turn it into a linked list with one single keyword change and no code needs changing, or that you can turn any collection into a synchtonized or readonly doppelganger with one line of code. Collections are nice and I miss them in Golang)
- pjmlp 2mo agoActually welcome to Smalltalk, 1980's, because that is where collections, and iteration with blocks, comes from as inspiration to Java, and all the folks that think LINQ was a .NET invention.
- shikck200 2mo agoJava? No thanks. I have some horrible memories from the ugliness, verbosity of Java. The cherry on the cake is the huge hog of an runtime called the JVM. Also java semi-forces you to have some bulky IDE. Last i looked there was no core java lsp server bundled in the tooling. Java is the enterprise language that make programming suck.
- Shish2k 2mo agoNone of that is anything to do with collections
- vips7L 2mo agoGo is far more verbose and uglier than Java ever will be.
- sideeffffect 2mo agoThe official VS Code extension from Oracle with an LSP server: https://marketplace.visualstudio.com/items?itemName=Oracle.oracle-java https://marketplace.visualstudio.com/items?itemName=Oracle.o...
- tzone 2mo agoPeople use Go vs Java not because of the language differences but because of massive improvement that GO runtime is compared to JVM. It is crazy that people still don't understand why JVM sucks, and why GO's approach to minimize GC pause latency is far superior design decision compared to whatever JVM has been trying to do with its GC iterations for god knows how many years with gazzillion different variants that all suck in different ways.
- Pooge 2mo agoI'm the biggest fanboy of Go, but since Java 25 the default garbage collector (ZGC) is very similar to Go's.
- hashmash 2mo agoLow pause collectors like ZGC and Shenandoah must be enabled explicitly. G1 is still the default. It should also be noted that the low pause Azul C4 collector was available in 2010, but it was a commercial product.
- Pooge 2mo agoYou're right; apologies! I set the JVM flag quite some time ago, haha.
- age123456gpg 2mo agoVery similar, in the same way non-compacting and non-generational collector is similar to compacting generational :shrug:
- tzone 2mo agoGarbage collector alone can't do what happens in Go language+runtime. Simplest example is that there is no way to allocate fixed arrays with non-pointer structs in Java. That is just not possible in the language. Design of Go allows programmer to rewrite their program to make it as GC efficient as needed. You can even have essentially zero GC overhead and do stuff manually for really high performance needs. And you can also write regular code when GC isn't a big deal. Those options simply don't exist in Java language. Your only bet in Java would be to embed some C code which is a nightmare of its own. There is a reason why almost all backened systems that run on JVM are a huge pain in the ass even at moderate scale. They all end up rewriting parts in other languages and at the end just rewriting the whole thing.