July 29, 2024

Java 8 streams OMG

Java 8 streams OMG

When you come to Java from .NET, your first question will likely be what does it have for LINQ, and the answer is streams. Fine, let's try them.

Suddenly, your code becomes slow as fuck. WTF happened? Ah, you've just added .stream().filter(s -> s.equals("abc").collect( blah-blah to your member, and now you are watching with astonishment the CPU load indicator that pins one CPU core to 100%, for some time.

That is the moment when an ethical developer who has integrity says 'Fuck this!' and reverts to the good, ole for() loop.

No, seriously! Java 8 streams suck balls. They are OK for lists that contain a handful of elements, but for anything that has more than a dozen, they fold their legs and sit down to snooze. It's really that bad. So, next time you go to a web site or bank machine and watch it spin those wonky loading rings, remember why: because developers are lazy and want to save a few keystrokes, at your cost.

Posted by: LinuxLies at 09:24 AM | No Comments | Add Comment
Post contains 175 words, total size 1 kb.




What colour is a green orange?




15kb generated in CPU 0.0059, elapsed 0.0374 seconds.
35 queries taking 0.033 seconds, 139 records returned.
Powered by Minx 1.1.6c-pink.