[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now closed. Thanks to all who applied!


[Advertise on 4chan]


File: java-logo-1.png (78 KB, 1280x1280)
78 KB PNG
cli apps? java
gui apps? javafx
mobile apps? android sdk
web apps? spring boot
games? libgdx
java is literally the only language you need
>>
>>109009943
good morning saar
>>
>>109009943
Java was good before Oracle bought it.
>>
File: 1778353876129869.png (21 KB, 1400x788)
21 KB PNG
>>109009943
>blocks ur path
>>
File: 1343612.png (85 KB, 3600x3600)
85 KB PNG
Sun was the greatest tech company that ever existed. Javadoc revolutionized API documentation. .NET documentation still has not caught up to Java in 1997.
>>
>>109011950
Also a good language. The only thing it's missing is checked exceptions.
>>
>>109009943
What's the current FOTM build system/VM now?
>>
>>109011940
Java is better now than it has ever been though. Competition is one hell of a drug.
>>
good marning saars
https://youtu.be/ucJTPda_zx0
>>
>>109009943
Java was initially meant to be a gateway drug to Lisp, but sadly it didn't work out.
>>
File: coffee.jpg (97 KB, 805x1079)
97 KB JPG
>>109009943
also java is great for leetcode with it's generics. hash table problem? here's your HashTable<K, V>, buddy. it's great to tackle amost any problem (except rt ones). not to mention that every class file starts with CAFEBABE hex to keep saars lil peepees hard and ready for ejaculating java code. nice.
>>
>>109013576
>Java was initially meant to be a gateway drug to Lisp
That's like saying "fleshlights are a gateway drug to sex with a Sports Illustrated swimwear model"
>>
>>109009943
>java is literally the only language you need
>>109011960
>Javadoc revolutionized API documentation.
>>109013522
>Java is better now than it has ever been
>>109013703
>java is great for leetcode
good morning saar, it is here the Durgasoft convention? I want to interview Mr. Nagoor Babu for our magazine, Bengali IT World.
>>
File: 1779631990533.png (60 KB, 768x412)
60 KB PNG
>>109009943
true. also memory-safe and performant.

https://ntrs.nasa.gov/api/citations/20200001733/downloads/20200001733.pdf
https://ntrs.nasa.gov/api/citations/20200002329/downloads/20200002329.pdf

>>109010069
>>109014477
cope
>>
>>109009943
this thread is retarded

>cli apps?
>web apps?
enjoy your insane startup times
>B-BUT MUH AOT
ok, enjoy your lower performance
>gui apps?
a web browser.

I don't feel like poking at anything else you said, because phones are slavery
>>
>>109011940
Java was a shitshow before oracle, but maybe they would improve anyway if it stayed Sun?

Anyway new java is really good and fast (openjdk 21+)
>>
>choosing Java over .NET
lmao
>>
File: ASML_Logo.svg.png (52 KB, 1280x359)
52 KB PNG
>>109011960
Can someone explain suble solar symbolism present in so many places in tech and elsewhere?
>>
>>109014571
>not chosing TypeScript
lol
lmao
roflcopter
>>
>>109014589
>javascript runtime
roflmaopmpwtfbbq
>>
>>109009943
Verbose and ugly.
>>
>>109014571
name one thing .NET does better than java, I'll wait
>>
>>109014589
Eww.
I'd rather programan in no code platform.
>>
>>109014659
Literally everything

You don't even have async await like C# does rofl
>>
>>109014659
>>109014672
I decided to ask ChatGPT for fun to write me the same code in C# and Java, and this is the result:

C#:
Task<List<User>> task1 = GetUsersFromSource1Async();
Task<List<User>> task2 = GetUsersFromSource2Async();

List<User>[] results = await Task.WhenAll(task1, task2);

List<User> filteredUsers = results
.SelectMany(users => users)
.Where(user => user.Name.StartsWith("anon", StringComparison.OrdinalIgnoreCase)
.OrderBy(user => user.Age)
.ToList();

foreach (User user in filteredUsers)
{
Console.WriteLine($"{user.Name} - {user.Age}");
}


Java:
ExecutorService executor = Executors.newFixedThreadPool(2);

CompletableFuture<List<User>> task1 =
CompletableFuture.supplyAsync(Main::getUsersFromSource1, executor);

CompletableFuture<List<User>> task2 =
CompletableFuture.supplyAsync(Main::getUsersFromSource2, executor);

CompletableFuture.allOf(task1, task2).join();

List<User> filteredUsers = Stream
.concat(task1.join().stream(), task2.join().stream())
.filter(user -> user.name()
.toLowerCase(Locale.ROOT)
.startsWith("anon"))
.sorted(Comparator.comparingInt(User::age))
.toList();

filteredUsers.forEach(user ->
System.out.println(user.name() + " - " + user.age())
);

executor.shutdown();


Java code looks like SHIT lmfao
>>
>>109014767
Java 25:
try (var scope = StructuredTaskScope.open()) {

var task1 = scope.fork(this::getUsersFromSource1);
var task2 = scope.fork(this::getUsersFromSource2);

scope.join();

List<User> filteredUsers = Stream.of(task1.get(), task2.get())
.flatMap(List::stream)
.filter(user -> user.getName().toLowerCase().startsWith("anon"))
.sorted(Comparator.comparingInt(User::getAge))
.toList();

filteredUsers.forEach(user ->
System.out.printf("%s - %d%n", user.getName(), user.getAge())
);
}


Syntaxtic sugar is one of the least important factors anyway.
If it bothers you that much you can use Kotlin and still benefit from Java's ecosystem:

coroutineScope {
val task1 = async { getUsersFromSource1() }
val task2 = async { getUsersFromSource2() }

val results: List<List<User>> = awaitAll(task1, task2)

val filteredUsers = results
.flatten()
.filter { it.name.startsWith("anon", ignoreCase = true) }
.sortedBy { it.age }

filteredUsers.forEach {
println("${it.name} - ${it.age}")
}
}
>>
>>109014767
also no need for toList() and separate forEach() in java. you can directly use forEach() on the stream.
>>
>>109009943
>cli apps? java
>gui apps? javafx
>mobile apps? android sdk
>web apps? spring boot
>games? libgdx
Java is a fucking toy language outside of corporate legacy systems. Android boots slow as shit and the only thing keeping it alive is native C.
>>
>>109015029
I work for a bank. We're in the process of migrating everything from COBOL to Java.
Should I let them know they're betting on a toy language? Which language should I suggest instead?
>>
I've heard that the JVMCI project is dying, and that's what GraalVM was using, how's that going to affect the project I wonder
https://bugs.openjdk.org/browse/JDK-8382582
>>
>>109015050
>Which language should I suggest instead?
Golang. A bank running on blazingly fast microservices would be a thousand times more efficient.
>>
>>109015050
Netflix runs on java and it's both fast and efficient. The whole "java is slow" thing is an outdated meme.
>>
>>109015050
>We're in the process of migrating everything from COBOL to Java.
So it's starting, the 2 boomers on this planet who still know Cobol and earn 500k a year are going mad
>>
>>109015083
I know.
>>109015088
Believe it or not, we're literally still hiring zoomers and teaching them COBOL.
>>
>>109015100
>we're literally still hiring zoomers and teaching them COBOL
boy do I not envy them
>>
java's great, knowing it gives me moneys
>>
>>109014500
>Borland

Now try MSVC
>>
>>109015064
Go sucks for complex finance business logic.
>>
>>109015891
>complex finance business logic.
kek it's the "complex business logic" guy again
>>
>>109014659
value types, lack of generic types erasure, passing by reference, structs, better c/c++ interop, soon union types, stack allocations and spans.
Just a few out of top of my head.
>>
>>109016256
now explain how any of that actually impedes you
>>
>>109015891
The fuck are you talking about? Programming languages are just implementations of mathematical algorithms and abstract data types. It's just that some languages like C and Go performs those same tasks better within stricter computational constraints.
>>
>>109016299
great discussion.
Now write why java is better than .net
>inb4 explain how any of that actually impedes you
>>
>>109016398
>explain how any of that actually impedes you
it doesn't. that's why java vs c# is not a discussion that is had in the real world.
these languages are not different enough for companies to consider moving their tech stack.
the decision is made based on the existing tech stack, the experience of the team, the available talent pool etc.
only spergs on the internet argue about java vs c#.
>>
>>109016574
you asked what .net does better and I told you. The argument wasn't if these features will make a company ditch their stack and rewrite everything in shiny new language
>>
>>109016308
what if my constraint is that i don't want a quarter of my code to be if err != nil?
>>
>>109016612
I'm nta, though. maybe I should have replied to this retard instead >>109014571
>>
>>109014579
nazis, basically
>>
>>109016715
What i fi told you that your handling of errors is dogshit?
>>
>>109016308
computational equivalence is meaningful in abstract theory, but doesn't account for domain-specific expressiveness which is critical for pragmatics.
>>
>>109017042
let's be real, error handling generally sucks, but if you do nothing in java or c# and let every technical exception bubble up to the global handler that rolls the transaction back, logs it including the ginormous stacktrace with line numbers / method names and returns a generic error to the user, you get a ton of debuggability for zero work and code complexity. that's the baseline to beat
>>
>>109017189
why wouldn't you just use a coredump?
>>
>>109017202
because i like my program to keep running
>>
>>109017214
eh..... EEEEEEEEEEEHHHHHHHHHHHH
My problem with this thinking is, I was an early ADOOOOOOPTER of Azure Kubernetes Service, and random networking bullshit would crop up all the time where pods would just be perma-disconnected from Azure SQL and the only working solution would be to
kubectl delete pod x
.
Sometimes running is strictly worse than just dying and letting your service manager attempt to restart you. bonus, flapping is a lot louder than silently continuing.
>>
i like java better than c# because it's more moddable.
you can just replace a single class file inside a zip (jar), but you can't do so in .net as it bunches up a lot of code in a single exe/dll.
and decompilers for java are near perfect, making code pretty much source-available.
c# allows lots of weird shit in obfuscation that completely breaks decompilers.
>>
>>109017214
what? you just said you have a handler. just longjmp out of the transaction after you've written the coredump.
java crashes by default too, why would you compare a java program written to not crash with a program you wrote to crash? obviously you do the same thing for both of them. what a stupid dilemma you created for yourself.
>>
>>109017277
>c# allows lots of weird shit in obfuscation that completely breaks decompilers.
this is either a downside or a feature depending on who you're asking
>>
>>109017264
current project keeps user sessions in memory, so killing the pod means erasing user work (architecture sucks, no control over it). but i agree, if everything is stateless, just die and get at least some benefit from the kube monstrosity
>>
>>109016398
>Now write why java is better than .net
it was another anon's point to name things .net did better than java, but all you did in response was list things .net does differently than java, with no explanation how exactly are they better
>>
>>109017313
i was talking about a typical webserver where you don't dump the core when an individual request fails. default in java is logging the stacktrace of the virtual thread that failed which usually includes enough context to reconstruct after the fact how the request got into the failing state. contrast that with manually assembling your stacktrace in go
>>
>>109009943
I enjoy making Swing applications in 2026
>>
>>109018046
are you excited to have date picker technology soon?
https://bugs.openjdk.org/browse/JDK-8379439
>>
>>109013628
that's javascript retard
>>
>>109009943
2010 called
>>
>>109015050
Java is fine, and it's a solid step up from COBOL since more than 30 people know Java.
>>
>>109014477
Jeets merely adopted Java. I was born into it. (I switched to C# though.)
>>
>>109014579
>subtle solar symbolism
>literally named Sun
>>
>>109014659
async/await pwns NIO.
>>
>>109017921
>value types, passing by reference, structs, stack allocations and spans
All of those allow to write code that doesn't copy, doesn't allocate on the heap, doesn't box primitive types in collections, which gives excellent performance. You can write c# that barely uses the GC
>lack of generic types erasure
let's me write new T() or if (T is something)
>better interop, union types
these are pretty self-explanatory

I'd also add async/await to the list. Many people may say that green threads are better, but I think having yielding points marked explicitly is better than yielding implicitly in random places
>>
>>109014767
looks way better than modern C++
>>
>>109011968
Why would I want that
>>
>>109016256
And it’s getting union types
>>
>>109015083
How do you know it’s efficient?
>>
>>109017189
Doesn’t java still make you boilerplate via checked exceptions?
>>
>>109017277
So java is insecure af. Code security was a major feature of .net at launch.
>>
>>109021290
>You can write c# that barely uses the GC
Java is by design a GC language. it's like saying helicopters are better than planes because planes need runways
Java can still be well performing, in addition to being more memory safe

>>lack of generic types erasure
type erasure is simpler and faster than retaining per-instance generic type information
there's rarely a case where you actually need the generic type of an instance, and most cases are just momentary laziness/convenience

>>better interop
so it's better because it's better

>union types
reinventing inheritance/composition
>>
>>109021822
Java is mainly a server language
in such use case users don't see the application directly at all, only what data it serves
even if there were a desktop Java client for some server, you would at best get only the interface to the server and not direct access to business logic
>>
>>109021863
cope

>Java is by design a GC language. it's like saying helicopters are better than planes because planes need runways Java can still be well performing, in addition to being more memory safe
C# is also by design a GC language, and none of the features I listed make it any less secure. Per your analogy, it's more like having 2 perfectly capable planes, but only one of them can also do a vertical landing/takeoff if you need it to

>type erasure is simpler
I don't care because I don't implement the runtime

>and faster
citation needed

>there's rarely a case where you actually need the generic type of an instance
I make use of it, not an argument

>so it's better because it's better
it's better because in c# it's just a simple annotated function declaration versus whatever clusterfuck java requires you to do

>reinventing inheritance/composition
this is your brain on OOP. Exhaustive pattern matching is all I need to say about this
>>
>>109022226
>Exhaustive pattern matching is all I need to say about this
p sure the shitty .NET hack is not only OOJeet codegen sugar, but it only "warns" on non-exhaustive matches.

honestly don't know why all you guys are arguing about this stupid shit. both languages are garbage.
>>
>>109014767
>look mommy I can handwrite my futures while worrying about esoteric shit like executors, that not even C++ tards can wrangle their minds around!

there is a reason why Java tards went back to greenthreads.
not even Rust cucks have to do all this shit, especially since the futures-rs lib abstracts a lot of the complex futures patterns as well.
>>
>>109022244
if compiler can detect when switch is not exhaustive then it just werks. I'm sure we'll be able to set some property to turn these warnings into compilation errors
>>
>>109014767
>>109014967
fucking unreadable.
>>109014500
java can still generate NullPointerException.
>>
>>109009943
>libgdx
do gamedevs still use this??
>>
>>109022341
as other anons, said. you're better off looking at Kotlin if you're a JVM head.
>>
>>109011968
There is a lot of hate for check exceptions, but for the life of me I don't see how including the possible exceptions in the type signature is worse than relying on documentation comments, catch alls, reading the code, try and guessing, or usually all of the above.
>>
>>109018147
Nah, he's referring to a quote from Guy Steele
>"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp."
>>
>>109022537
>Java
>halfway to Lisp
Not remotely suprised that a Java spec co-author is a drooling retard
>>
>>109014967
>getters to get strings and ints
Disgusting OOP
>iterating over the same stream/list 5 times instead instead of using a for loop
Disgusting to look at and inefficient

Thank god I don't have to deal with this shit
>>
>>109022610
>>iterating over the same stream/list 5 times instead instead of using a for loop
it's called functional programming and it's the latest fashion
>>
>>109022226
>Exhaustive pattern matching is all I need to say about this
this is your brain on avoiding OOP in an OOP language
>>
>>109014967
>>109022341
>>109022610
>>109022625

So happy I just need to write:
const query = { where: { name: { [Op.like]: "anon%" } } }
let users = await promise.all([ users.findAll(query), users2.findAll(query) ])

users = users[0].concat(users[1]).sort((a, b) => a.age - b.age).forEach(user => {
console.log(${user.name} - ${user.age})
})

This is 100x faster in real use btw, because lesson 1 of coding things that are actually used is that you never fetch the whole table, you let the db filter it.
>>
>>109022714
>
sort((a, b) => a.age - b.age)

kek. I forgot you still have to stub out comparators for primitives.
>>
>>109022632
good luck with all your non-handled cases when you add a new subclass to your class hierarchy
>>
>>109009943

All of this is good except JavaFX. It was very promising but they literally never finished it. And then Swing got HiDPI support. I really tried to make JavaFX work and it does have better bones than swing. But you need to install 3rd party shit just to get a close to complete gui toolkit, and even then you still notice the cracks.

If you need a desktop gui in 2026, use Python bindings to Qt and just be done with it.
>>
>>109022952
I always felt like Java was extremely behind on UI elements. I've used a great deal of Swing and JavaFX, and while FX was a marked improvement it still lacked a lot.
>>
>>109023025

I wrote Swing for the first 3-4 years of my career and then wrote JavaFX (porting 1 of those swing apps). Good times honestly, it was my first job out of college and I was given basically free reign to rewrite this important desktop app that someone had managed to code into a horrible clusterfuck (single god method that was 3-4k LOC and operated mainly on an Object[][][]), with a couple 1-2k LOC helper methods. I rewrote it from scratch, took 3-4 months and it was genuinely the only time in my now 12 year career that someone has asked me to solve an important problem and then just _let me fucking do it_ and not been autistic about how. That code still runs and just werks and they add to it here and there all these years later. (I have a friend who still works there).
>>
File: fact.png (40 KB, 341x498)
40 KB PNG
>>109010069
Reminder that all the anti-Java posts are made by seething Gojeets who feel the need to project their pajeetness onto everyone else out of insecurity for being brappy subhumans
Java was made by white men for white men
Go was made by kikes to tard wrangle brain dead jeets
>>
>>109023082
It took you 3-4 months to rewrite a 4k LoC desktop application?
>>
>>109023082
One of my first bigger projects at my first job was rewriting a major workbench UI from swing to FX. That took a while but I did learn a lot and have some fun.
I went a bit too far in some places with the rendered curves and made the workbench slow to a crawl. That was a funny bug fix. Maybe calculating a cool curve to render a transparency on was a bad idea for performance.
But at least the new buttons had a cool drop shadow and interior highlights and nice curved edges. Also the logo wasn't a tiny piece of shit jpg with artifacting after I was done tracing it in gimp and making a massive PNG that I could scale to any size.
>>
File: 1769726928180.gif (268 KB, 393x450)
268 KB GIF
>>109021526
This but unironically. I am tired of Bjarne and the retards behind the "Core Guidelines" pushing snake_case autism and the retarded ass std::views instead of just having a normal streaming API like Java, C# and Rust which did not need to be changed to use this faggot pipe operator.
Most importantly collection types with no inheritance is retarded and gay.
>>
>>109014767
I think this shows the greatest downside of java vs c#. Lynq or whatever it's called is so muc more intuitive and easy to use. I have no idea what oracle was smoking with their stream api. I have been using it for years now and I still have to look up everytime what map and flatmap does and so on
>>
>>109009943
Jeeva is a good choice. Especially now when we have GraalVM. Much easier to build cli & gui apps nowadays.
In Europoo Java is still top #1 language in backend.

>>109023150
C# is better as a language. Much more syntax sugar. Better generics. Linq is much butter than stream api.

But the whole .NET ecosystem? Not sure. In Java world we have not only java but also kotlin, scala (not popular but still alive), groovy.
Spring, Quarkus, Micronaut, Helidon, Javalin, some modern java EE frameworks. Not only asp.net like in .net world.

Also not sure about async/await vs virtual threads. Async/await splits your code in two worlds - async and blocking. Function coloring. Virtual threads allow not to do this.

I still think it's better to invest your time in learning jvm ecosystem if java is popular in your country (and this is the case in every country btw).

Go is also nice, but only as a second language. I almost don't see any goolang jobs in my area.... It's somewhat niche language for infra, k8s, observability tools...
>>
>>109014767
var users1 = CompletableFuture.supplyAsync(Main::getUsersFromSource1);
var users2 = CompletableFuture.supplyAsync(Main::getUsersFromSource2);

users1
.thenCombineAsync(
users2,
(l1, l2) -> Stream.concat(l1.stream(), l2.stream())
).join()
.filter(user -> user.name().toLowerCase().startsWith("anon"))
.sorted(Comparator.comparingInt(User::age))
.forEach(user -> System.out.println(user.name() + " - " + user.age()));


The most awkward part is combining the lists into a single Stream.
>>
Kotlin is a literal sloplang
>>
>>109022951
that's only an issue when you try to avoid OOP while doing OOP
>>
>>109023485
this literally is a problem when using subclasses and isn't when using unions
>>
>>109023110
>and making a massive PNG that I could scale to any size.
Why didn't you just use SVG?
>>
>>109023467
It's amazing that Java waited 20 years to get LINQ, had the advantage of learning from how .NET implemented it, and still managed to end up with an implementation that is worse in every single way. Every single line there just "how can we take the C# example and make it more of a mess and a pain to use".
>>
>>109022589
He literally also designed Scheme and Common Lisp, dumb retard.
>>
>>109023862
sounds like you're using subclasses wrong
>>
>>109011960
This is unironically true
Not even Rustdoc is as beautiful as Javadoc
Never mind .NET documentation and the Indian dung heap that is cppreference.com
>>
File: 1754950228548952.png (32 KB, 780x783)
32 KB PNG
>>109014477
>saar saar muh durgasoft saar java is le durgasoft saar i am not an indian though saar
Shut the fuck up Ranjeet and go back to vibecoding your shitty Go social media clone.
>arrow because you look like this and say this
>>
>>109024030
I don't care what he did. It's a retarded statement and you're a retard for defending with an appeal to authority.
A GC does not make a C-like "halfway to Lisp". That would put Go in that category as well.
>>
>>109022952
Javafx, swing, whatever, any desktop app made with java with some gui library is going to be 1000 times better than electron shit. It pisses me off that electron became the standard cross-platform desktop app framework when literally anything else is better.
>>
>>109023025
>Java was extremely behind on UI elements

Yeah, Swing and JavaFX are pretty legacy at this point. But they’re still usable. There’s a massive amount of enterprise shit written in Swing that’s still being maintained today, and some places are even unironically writing new stuff with it.

The main issue is that Swing/AWT is just very old. It’s over 26 years old. And it’s a cross-platform UI. This shit has to run on Windows, macOS, and Linux. We're talking Windows all the way from XP to 11. Every single macOS version from the last two decades. And Linux running both X11 and Wayland.

Obviously, Qt is the better choice nowadays, but overall Swing is one of the few actually prod-ready cross-platform UI frameworks assuming you don’t want to go full webdev with Electron+Chromium and drag a whole browser engine along just for a desktop GUI.

JavaFX, sadly, turned into a half-baked project. They’ve finally polished it now, but it was absolute bloatware and jank when it launched. Plus, it dropped right when desktop development was already dying, so basically nobody remembers it exists. It’s not abandoned though, it’s still getting updates and support.

That being said, JeetBrains actually managed to tune Swing inside their custom JRE. Literally all of their IDEs bundle a custom JRE where Swing and AWT have been heavily reworked. IDEA, PyCharm, CLion, and the rest of their stack are all running on top of good old Swing, just heavily modified by JeetBrains.
>>
>>109021894
This is cope.
>>
>>109024117
It's really embarrassing to explode so angrily about a joke made before you were even born.
>>
>>109024695
Not only that. This is ultracope >>109023448
Yes java is still relevant in legacy, just like there is a lack of fortran programmers. It's only because of legacy and terrible leadership.

Understand this: JS is now outperforming Java in several benchmarks. Because JS is a future language with active development, something new projects choose. While java is a legacy language with oracle rent-seeking.
>>
>>109024799
you're living in a js nigger bubble. there are entire industries betting on java and writing tons of new shit. that includes Netflix btw.
>>
>>109022610
>>iterating over the same stream/list 5 times
that's not what is happening, idiot.
>>
>>109022415
game devs never really used it. there are a couple of published games made in it, but not a lot.
Minecraft was made using lwjgl which is lower-level and also used by libdgx.
>>
>>109022714
we were comparing syntax, you genius.
>>
>>109024856
Im not. In my bubble mostly talk about go and rust. and there's the python nooblords.
notice how you didn't even deny that JS is now faster in some benchmarks.
>>
>>109024786
At least you gave up defending it, but acting like a snarky child won't undo your retardation.
>>
>>109021822
no, it's not. you're conflating java with java applets which don't even exist anymore.
>>
>>109024923
didn't bother to even engage with that because most benchmarks are bullshit and your cherypicked one won't be an exception.
>>
>>109024899
It is.
1. .flatMap(List::stream) turn every list element into a stream element
2. filter, iterated over each and call their getName (retarded)
3. sort
4. iterate over the stream and copy every element into a list again
5. foreach with print

It's behind the scenes the same as 5 for loops after each other.
>>
>>109024923
also notice how you didn't even deny that java is a major part of Netflix's techstack.
>>
>>109024932
You don't even know who you're talking to. I never took a position. I'm just the guy who posted the source of the idea that "Java was meant to be a gateway drug to lisp". You're having a complete mental meltdown over literally nothing.
>>
>>109024992
The only mental breakdown seems to be coming from you. Chill out, bro.
>>
>>109011960
Maybe they’re secretly one company
>>
File: 109Li3gjNSaJ.png (74 KB, 1057x539)
74 KB PNG
>>109024950
They are not. They are showing very clearly that JS that was previously much slower is now sometimes beating java, and mostly on par. With less baggage, less runtime issues, cleaner and less code.
>>109024962
Yes, no one is claiming it's not relevant in legacy, just like no one can deny that fortran devs are in high demand.
>>
>>109024961
operations in a stream are not equivalent to a for loop. they are chained per element.
obviously that's not possible in the case of sorting because you need all elements for that.
but you can't do that order of operations with a single for loop either.

if you change the order of operations you can write more concise and equivalent code in java as well, with or without streams.
and as mentioned above the forEach can be directly called instead of toList.
the AI wrote it like that because that doesn't work in c# and it tried to make it equivalent.

unsurprisingly the comparison is intellectually dishonest. the fact that anon had to use AI should have been a warning.
>>
>>109024799
>Understand this: JS is now outperforming Java in several benchmarks. Because JS is a future language with active development, something new projects choose. While java is a legacy language with oracle rent-seeking.
Maybe in India, but not to people who actually want to use applications that do not consume 10 gigabytes of ram per instance.
>>
>>109025033
>netflix
>legacy
you have to be 18 to post here.
as expected the benchmark looks like trash.
the implementations aren't equivalent at all.
using objects like BigInteger instead of primitives is obviously going to suck for performance.
>>
another point for java: command line compiler.

javac Program.java

vs

dotnet exec "C:\Program Files\dotnet\sdk\10.0.100\Roslyn\bincore\csc.dll" /r:"C:\Program Files\dotnet\packs\NETStandard.Library.Ref\2.1.0\ref\netstandard2.1\netstandard.dll" Program.cs


but on dotnet you are not even supposed to use the compiler directly, so they hid csc away from being a simple exe, you have to slather yourself in csproj xml instead!

furthermore, the resulting compiled program you can run with

java Program.class

but

dotnet exec Program.exe

will refuse, because it also needs you to create Program.runtimeconfig.json file:

{"runtimeOptions":{"rollForward":"Major","framework":{"name":"Microsoft.NETCore.App"}}}


of course the "normal" dotnet build will hide all of this from you, but will also waste your time on whatever unnecessary things it likes doing.
>>
>>109025033
>>109025123
the one billion row challenge should have proven that java's speed is mostly limited by skill issues: https://github.com/gunnarmorling/1brc

besides performance is not the only factor.
JavaScript sucks in other ways as well, like being dynamically and weakly typed. npm also sucks ass.
really the only reason it's popular is that it's literally the only option in the browser.
>>
>>109009943
C# is better desu. At least GUIs aren't as autistic. I also hate the .stream() bullshit. And no raw strings
>>
>>109024923
>In my bubble mostly talk about go and rust
yep, go is good for infra and rust as c/c++ replacement. but what does this have to do with java?
also almost all backend jobs require java here (EU), some require .net, but java is definetly more popular in germany, austria, france, netherlands, britain, ireland...

rust is on hype right now mostly because of AI, but in real life nobody doing prod backend in rust. banks, telecom, insurance companies, fintech, gov services - almost none of this is written in rust. rust's niche is low level stuff, maybe robotics, embedded, defense - where c/c++/ada spark is used right now, not java...

there's almost no jobs neither in go stack neither in rust... maybe in the US the situation is different...
>>
>>109015029
Android isn't written in Java smoothbrain
>>
>>109025033
but there's another benchmarks too...
>>
>>109024799
>JS is now outperforming Java in several benchmarks
kek, js even outperforming rust and zig in your benchmarks. do you think these benchmarks are correctly performed?
>>
>>109025074
Okay, I thought that anon was in favor of java and showing the other anon how to do it properly.

>>109025105
>but not to people who actually want to use applications that do not consume 10 gigabytes of ram per instance.
Yeah if you do you fucked up that's why I posted realistic examples... Where JS uses less memory to finish faster.

>>109025123
>netflix
>legacy
Yes. Is it hard for you to understand that a declining 28 year old company is legacy? With 19 years in streaming...
>the implementations aren't equivalent at all.
Yeah sadly no one does proper inter-language benchmarking.
>using objects like BigInteger instead of primitives is obviously going to suck for performance.
But Java being a semi compiled, much less ergonomic language vs. a simple scripting language is should be exponentially faster by default, far outpacing such things.
Java encourages very slow ways of programming though.
>>109025170
>the one billion row challenge should have proven that java's speed is mostly limited by skill issues:
Java encourages OOP bloat.
>besides performance is not the only factor.
it's the one selling point java has Vs. JS or hell even python.
> npm also sucks ass.
It's a lot better than the java dependency situation.
>>
>>109015064
> blazingly fast
cringe
>>
>>109015029
>muh C saar C is le badass saar i learnt it in my CS50 class at durgasoft saar malloc is badass and macho saar
Be quiet Pajeet Patel, go back to asking ChatGPT to finish your assignments.
>>
>>109025626
>Is it hard for you to understand that a declining 28 year old company is legacy? With 19 years in streaming...
as I said you have to be 18 years old to post here.
legacy software has nothing to do with the age of the company.
netflix only adopted spring boot as its core framework in 2018, meaning they developed tons of new services in java since then: https://netflixtechblog.com/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0
>We are happy to announce that starting in 2018, Netflix is also making the transition to Spring Boot as our core Java framework
you are factually wrong.
>Java encourages very slow ways of programming though.
it's literally up to you.
>it's the one selling point java has Vs. JS or hell even python
as I said js and Python are dynamically typed which sucks for reliability and maintainability.
maven is much better than npm with its redundant node_modules folders or pythons dependency hell that forces users to use virtual environment for each project.
Javascript has no selling point other than being the only language usable in the browser.
>>
>>109024856
Netflix is ancient
>>
>>109025163
Every critic of .net is an ignorant retard and you are no exception
>>
>>109025626
npm is a nightmare.
Maven sucks and the java ecosystem is full of ancient cruft and xml and dumb decisions but it's stable and robust.

The js ecosystem is a trash pile and npm is the rug that all the trash gets swept under.
>>
>>109026102
le "i have no argument"
>>
>>109026530
dotnet run App.cs
>>
Anyone have a simple conditional statement written in four different ways and the final one is a java programming saar?
>>
>>109025163
you probably know, but
java Program.java

works as well now, it compiles the program on the fly and executes it. neat for small script like things
>>
>>109027669
why have javascript when we have java scripts?
>>
>>109025365
java had raw strings before they landed on multi line text blocks. i like the latter because they get rid of surrounding whitespace and still allow using double quotes unescaped inside. doesn't help with regex escaping madness though
>>
>>109027686
right? the only thing missing from the standard library to make this even more useful is some built in json support, but that's in the works (blocked by valhalla, of course)
>>
File: DUKE.jpg (419 KB, 1122x1402)
419 KB JPG
GOOD MORNING SAARS
>>
>>109027878
get new material
>>
>>109028192
I just liked the picture and it was morning.
Luv the JVM
>>
i need my daily dose of HotGayIndianAnalSexConstructorFactory
>>
>>109025626
>Java encourages
a language doesn't encourage anything
some approaches or practices might become conventions and industry standards, but that's a specific group of people, not the language itself

also, what's exactly wrong with legacy code? all it means that it still works and can be worked on after years and decades of development. is having to fucking dump the whole codebase and rewrite everything from scratch every 5 years supposed to be better?
>>
File: 1523777338603.jpg (21 KB, 365x363)
21 KB JPG
>>109024678
bummer that they force you to use kotlin if you want to use that custom-swing.
>>
File: Bucket of truth.gif (1.45 MB, 400x298)
1.45 MB GIF
4chan should be remade entirely in spring boot
>>
>>109028574
wow
/g/ is good at one sentence horror
>>
>>109028589
Go on Timmy, prove me wrong.
>>
holly shit? this thread is still alive? java won and it's not even funny
>>
>>109026530
It’s clear anons like you don’t actually care about facts so why bother relaying them? You know you’re either a low info retard or just have an agenda.
>>
>>109029448
if you have nothing interesting to add then shut your trap. complaints and insults aren't interesting to anybody. facts are to someone who is reading.
>>
>>109011950
I feel the language is unfortunately following the same path as C++ with adding more and more features.
>>
>>109029513
it must add new fashionable features if it wants to stay relevant. it's a mainstream language and more or less they(java, c#, c++) are all the same just with a bit different syntax and memory handling.
>>
>>109029713
nah, most of syntax sugar are useless now. most of code is written by llms so we don't need most of new c# and cpp features.

probably .net team should work on .net runtime, gc, memory footprint, improve asp.net framework ecosystem, but not to add useless language features
>>
>>109029513
Wouldn't be so bad if they deprecated and eventually removed the old Java ways of doing things.

>>109029713
Explain how C# would have become irrelevant if it didn't add primary constructors.
>>
>>109028574
it would unironically be an improvement over whatever the 25+ years old php mess they have back there is
>>
>>109027686
JavaScript unironically would have been a pleasure to write if it actually looked like Java. They even had all of the Java keywords reserved because there was talk of actually using them. A shame that all we got instead was TypeScript, which is still ugly as shit
>>
>>109028574
Spring is unironically beautiful compared to JS slop or the unreadable trash that is PHP
>>
File: shitposting license.jpg (6 KB, 225x225)
6 KB JPG
>>109028374
>all it means that it still works and can be worked on after years and decades of development
NOOOOO!!!!!
YOU GOTTA CHURN OVER THE WHOLE CODEBASE EVERY WEEK SO PEOPLE KNOW IT'S ALL STILL RELEVANT!!!



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.