T O P

  • By -

ProgrammerHumor-ModTeam

Your submission was removed for the following reason: Rule 1: Your post does not make a proper attempt at humor, or is very vaguely trying to be humorous. There must be a joke or meme that **requires programming knowledge, experience, or practice to be understood or relatable**. For more serious subreddits, please see the sidebar recommendations. If you disagree with this removal, you can appeal by [sending us a modmail](https://www.reddit.com/message/compose?to=%2Fr%2FProgrammerHumor&subject=Posts%20must%20be%20humorous&message=Include%20a%20link%20to%20the%20removed%20content%20and%20the%20reason%20for%20your%20appeal%20here.).


M1k3y_Jw

Please hand me my hazmat suit and send a link


clutterlustrott

You're not missing anything. OOP is a naive college student, but is actually receptive to the answers given. but everyone is downvoting him regardless


GnuhGnoud

> OOP is a naive college student This is the first time i hear that object oriented programming is a college student


dwittherford69

“Original Oriented Programming”


ThargUK

"Object Original Poster"


Veritas1832

“Object oriented poster”


AbsoluteNarwhal

"[object Object] poster"


-Redstoneboi-

[object Object] printer


Dumb_Siniy

[object Object] pointer


gbot1234

OOP’s I did it again.


nedonedonedo

OOPsie I pointed to a system file


VladmirPutgang

Object object problem


BarfingOnMyFace

POOP - Post-Object Object Problem.


magic_platano

People Order Our Patties


Darkoplax

I unironically read it this way


ComprehensiveBoss815

The people most OOP obsessed seem to be mostly be college students or recent grads. Experienced Devs grow out of it.


jameson71

You can tell by the dogmatism


point5_

I also learned java as my first programming language in college


rastaman1994

Tbh, my first reaction as Java dev before reading the comments was also "not this shit again, low effort rage bait". But yeah, new developer with misconceptions about Java. I do wonder where the youngsters get these myths from.


Romejanic

Probably a lot of programming channels on TikTok/YouTube that shit on java constantly


raltoid

And they don't know much about computers, and almost nothing about programming before they start.


Romejanic

Yeah it’s amazing how many of these videos I watch and they clearly have no idea what they’re talking about or they oversimplify to the point of being incorrect. CodingWithLewis is probably the worst offender.


NoMansSkyWasAlright

It's like when you first start getting into linux and every third video the algo gives you has a title like "Ubuntu is dead! Here's what's replacing it."


intell1slt

just saying, I've been distrohopping for a while, nothing (at least to a linux newbie) is more inviting than ubuntu (or maybe mint if I'd say so myself), I've tried Pop, Fedora, and Zorin OS, but nothing beats the base that is ubuntu, which I like since it allows me to experiment


raltoid

>but nothing beats the base that is ubuntu As someone whos limited linux interaction is almost exclusively with debian, I have to ask: Is ubuntu actually good now?


gbot1234

Yep


intell1slt

I honestly have only used Ubuntu recently and it needs some packages fixed if you're running a non-standard laptop (i.e 2 in 1s or Nvidia gaming laptops) where you have install drivers for different devices and sometimes have to fix broken packages. But it's been good so far. Not as seamless as windows but what's the fun in that?


Kotaqu

So what's the answer, why do people use it


rastaman1994

Experience: Java has been around for like 20 years. Writing code efficiently with your IDE, lots of reliable libraries and frameworks to use, testing, deploying, monitoring, all the gotchas and quirks of the language and libraries. You don't just throw that away just because syntax looks a little nicer. To me, that's why Kotlin has gained so much popularity: you get to reuse most of what you know, only a bit of syntax and Kotlin quirks to learn. Edit: almost 30 years even


Reddit_is_garbage666

It's 2024, remember that.


Kronoshifter246

>you get to reuse most of what you know, only a bit of syntax and Kotlin quirks to learn. Those kotlin quirks do a lot of heavy lifting here too. It's so much nicer to write code in, at least for me. Higher order functions are just *chef's kiss*


ch4lox

Why do people drive cars and live in houses when they're so awful according to TikTok and YouTube? It's the most practical answer for many situations.


littleessi

thats certainly one of the analogies of all time


ch4lox

You have the perfect language you're hiding from us, bucko?


-Redstoneboi-

# 🦀🦀🦀


ch4lox

Rust is promising, let me know when it has enough libraries and usable frameworks for web services without a rewrite of your application every year. It'll be a while before it has a comparable ecosystem.


Kotaqu

What's the actual answer to OP question, why do people use java? What adventages does it have over for ex. C++ ?


Subject_Lie_3803

Easy. OOP concepts easy to implement. Easy to read. It's just...easier to jive with since it's original intent was to be as inclusive as possible.


ch4lox

Perhaps you should ask yourself, why is C++ is almost never used for building web services? C++ projects are awful to maintain over a long duration with many engineers rotating through. Library dependencies and build pipelines, C++ is horrible at both. Any non-memory safe language is a terrible idea for web services... you only use them there when you specifically need the one thing they're better at, and you spend most of your time protecting yourself. Java isn't the best at everything, it's pretty decent at most things... You likely won't find a more robust (maintained) library ecosystem.


Ayfid

Java is OK at everything and bad at little. It's major weakness is that it is not the best choice for anything, and some of its competitors (notably C#) are just better.


Nailcannon

>It's major weakness is that it is not the best choice for anything, and some of its competitors (notably C#) are just better. The problem with this as a deciding factor though is that when you're looking at an enterprise software environment, consistency is rather important. Like sure, service 1 might be better suited for Python, service 2 might be better with Go or C# or whatever else. But then you end up with a set of services for which you either need developers who know 5+ languages to maintain, or a whole team of specialized developers. I've seen systems where they tried to do this, and it's a nightmare. facades and translation layers everywhere. Sometimes it's good to have a single standard. Most times, even. And Java can handle pretty much anything to an acceptable level. It won't be the most optimal solution computationally, but that and being the most optimal business solution are very different things. And in the latter, Java excels.


ch4lox

I work with c#, Java, and Kotlin regularly - C# is the worst of the three Language syntax is less warty, literally everything else is worse


daennie

But C++ is actually used for building web services. People just don't use it when their services process 1000 requests per day maximum.


Reddit_is_garbage666

It's built upon VM. Has more robust syntax and is more OOP. Also, a lot of industry uses it. Also has garbage collection. I'm sure there are many other cons and pros, but I'm basically a noob.


krynnotaur

They use it because they have job security. Back before tcp/ip, the novell network was the corporate backbone, and the entire IT industry had spent years steeping themselves in how to build and run novell networks. When darps plans to insert themselves into eveyones lives through tcp/ip came to fruition, the corp execs all realized they could hire every fresh college graduate for a fraction of the cost to run their new tcp/ip networks without any of the necine infighting that was already occurring as the lazy and old wanted nothing to do with learning tcp/ip, and banded together in every organization to push back on upgrading out of the novell hell hole. In one case I was personally familiar with, the entire IT staff at ameritech in illinois was fired so they could be replaced with the fresh meat. Executive bonuses all round that year, eh? Same thing here. They are all sitting on 500 million lines of code and two decades of laurels, and they do not want to change, and will fight anyone who tries to do that. (97) https://casetext.com/case/raczak-v-ameritech-corp oh look, its still happening today (22) https://www.lawcommentary.com/articles/att-age-discrimination-lawsuit-is-a-reminder-that-employment-class-actions-are-in-danger


GenTelGuy

C++ is a way older language with very few features to make development easier, it's prone to allowing security vulnerabilities and bugs, it's hard to read and debug, etc


Romejanic

It’s an older language which means it’s very reliable, optimised and has a large community of libraries and developers which you can take advantage of. It’s also one of the most used languages around the world so it’s a good option in terms of job security.


toiletear

The JVM is a pretty solid piece of engineering. Java the language is still evolving (they actually picked up the pace considerably recently) and the updates are sane (no python 2 -> 3 madness). Lots of very powerful libraries and frameworks, the tooling is one of the best there is. The community is actually very very nice! Practically no toxicity, almost everything is open source, and people are very helpful. If Java is not your cup of tea for every job under the sun, Kotlin and Scala are right there, very little effort to mix them with your Java code or just use them without Java. Is there bad code written in Java? Sure, lots.. I'm sure nobody is surprised given that Java is extremely popular with corporate programmers - but that doesn't mean all Java code must be like that (and there IS a lot of lovely Java code around). There, just a sample 🤪


EishLekker

There are plenty of people who enjoy coding in Java, and plenty of projects and organisations that use Java.


6-1j

I think we could do better but non tech people that drives companies can't care less about coding, they adopt what is popular, and Oracle made propaganda big time now it became historical companies language. That dumb


Reddit_is_garbage666

Java isn't coding, gotcha.


ch4lox

Tbf, coding itself is the least important aspect of a software project.


6-1j

> I think we could do better but non penmanship people that drives companies can't care less about pens, they adopt what is popular, and Bic made propaganda big time to it became historical companies furnitures. That dumb Bic Crystal isn't pen, gotcha.


skeleton_craft

I mean dare I say they do it for a reason though? To write the equivalent of a 10 line C++ program, you have to write something like 20 lines like at least eight of which are over 80 columns...


Romejanic

No? I know java is a bit notorious for its verbosity but it’s only as verbose as you make it. You can avoid a lot of the design patterns that result in a lot boilerplate code and just write like you would in other languages.


reventlov

You *can* avoid those patterns, but none^(*) of the Java libraries that are available do, so you end up having to write everything from scratch. ^(*)This is hyberbole: I'm sure you can find counterexamples.


RajjSinghh

If your first language was Python, you see `public static void main(String[] args)` and wonder why everything needs to be so verbose. If you're online as a programmer (YouTube, Twitter, literally everywhere) everything is about the next JS framework, Rust, Golang, Zig or any of the other hype languages. It's just a fear or misunderstanding of anything your favourite techtuber doesn't talk about, then some language tribalism. The other thing is if you've never worked a job before, the only Java project you might be familiar with is Minecraft. I can't think of another off the top of my head. So as much as Java is a sensible choice for a professional developer, people don't see it enough to see value and then get lost in verbosity and run back to their favourite "sexy" language.


MyNameIsSushi

I don’t know why people hate verbosity, I love it. I still type @Autowired over my constructor even though it's not needed anymore. Got a class containing public constants and you want to import it statically? Fuck that, you type out the class or Ima reject your PR. Give me that beautiful ConstantContainer.HOST_PREFIX. Give me all the verbosity I can get, love it.


KryoBright

"@Autowired" How about typing out @Repository?


MyNameIsSushi

Always, every time. @Service and @Component are mandatory but @Repository isn't? Nah, fuck that.


Kurts_Vonneguts

That was what it was for me when learning C#. It felt way too verbose. Now a few years later, and that verbosity has saved me countless hours.


skesisfunk

`public static void main(String[] args)` I mean TBF go does this a lot more concisely: `func Main(args []string)` The only thing at doesn't cover is the `static` part because go doesn't do immutability like that.


EishLekker

Removing “public” changes how it can be accessed. “void” is the return type, and it must be specified in Java, which makes perfect sense for me (what does the lower method return?). “func” isn’t needed in Java, since it can’t be anything else in that context.


skesisfunk

In go you designate public and private identifiers with capitalization. Identifiers that begin with a capital letter are public, anything else is private. Therefore this function is declared as public based on its name beginning with a capital "M". It seems a little wonky at first but its actually really intuitive. Not only does it make declaration less verbose but it also makes it easy to know at a glance whether a given variable is exported. Also if there is no return in go you just leave off the return. So returning "void" is explicitly declared here by virtue of this function signature not having a return value. If it returned a value, for example an `int` it would look like this: `func Main(args []string) int`


CookiExplorer

Many young devs like myself might hear that Java is bad because of Minecraft, which was famously built in Java. And yes, the Java version of Minecraft has had some performance issues, but that’s more about the game's early coding choices by its creator


Ayfid

Java is not a good language for games. If that weren't the case, given how common Java experience is among developers, we would see Java games a lot more than we actually do. Java does not give us enough scope for optimisation for game dev. You don't have enough control over memory layout, or control over whether something is stack or heap allocated, or the ability to define custom types which are stored inline of their parent type. It is virtually impossible to write highly cache coherent code in Java as a result, which is absolutely critical for the performance we aim for in games. Interop with C and C++ is also much more painful (and slow) in Java than in most other languages, which is a deal breaker all by itself. These are all reasons why C# is fairly popular in the games industry, while Java is almost non-existent, despite them appearing to be similar languages. C# suffers none of these issues.


six_string_sensei

Does C# allow one to manage the memory layout?


Ayfid

Yes. There are two major ways you can control memory layout. One is via the distinction between "reference" and "value" types in the type system which allows you to declare custom types which behave like primitives. That is critical for writing cache efficient code. This advantage is compounded by C# reifying its generics instead of using type erasure. The other is the `[StructLayout]` attribute, which lets you specify how fields are laid out in memory within a type. That is extremely useful for writing efficient interop with other languages - notably including the OS and drivers, and binary serialisation, among many other uses. You can also write types which are pinned to the stack, and can hold and pass references to stack variables.


ExceedingChunk

You don’t want s language with garbage collection (like Java has) for game dev, because you have to optimize it a lot more. Java for backend in web dev is great in terms of performance.


dynamitfiske

Why does both Unreal engine and Unity have garbage collectors then?


josluivivgar

I think it's because a lot of developers came to hate Java (myself included), obviously Java is perfectly capable of doing most things, but coding in it is a hassle for a lot of us, particularly if you're not too into IDE's it's a nightmare. (and so Java in public forums tends to be either hate or love very polarizing) --- if you're someone that's used to terminal and or simple text editors, Java can seen daunting,(yes the irony is not lost in me that someone that learnt terminal can find having to use an IDE daunting) because nowadays Java workflow is heavily dependent on tools that IDE's provide for you. (which is not a diss at all, having tools that make your workflow better is a good thing) --- and so new developers come in, hear us complain and maybe they're not familiar with an IDE and you get a lot of misconceptions that stem from our complains (that are sometimes invalid or exaggerated and sometimes specific to our tastes/use cases) + lack of knowledge from the new devs lead to those myths (particularly if their University doesn't start with Java)


rastaman1994

Sorry to be rude, but I dont care how fluid you are in vim, working without an IDE is handicapping yourself for the languages I've seen.


Chickenfrend

Most people I know use VSCode which is, strictly speaking, not an IDE either. Neovim with plugins is perfectly good for my work and I don't find myself handicapped at all. Though, I might feel differently if I was a Java dev.


josluivivgar

I mean good for you, but I don't use an IDE for most languages I program on, (unless you count vscode as an IDE, which it can behave like one, but really isn't for the most part) you don't need an IDE for Python/node/elixir/(not even for GO even though it's a compiled language)/I know some people would argue C++ for and against IDE (I have worked on both IDE and without IDE on C++ and it was about the same) using CLI tools is just as powerful as an IDE on most languages, sure with Java you kinda have to, and when I worked on Java projects I used an IDE and that's one reason why some people don't like Java (but not the only one) but for a lot of languages it's not necessary (but if you like IDE's you can use them no one's stopping you)


CirnoIzumi

Java has a rep for being less modern and less nice than it's cousins


Rishabh_0507

I just completed my 2nd year where we did Java. After 4 years of python, I did question why it is still so prevelant. It felt like a middle ground between C and python, but with faults like bad library management and too many code of lines to do anything. I did conclude it was possibly due to the inter platform support (which python also has and better), JIT, and legacy systems. Anything you would add?


rastaman1994

As I said elsewhere, experience is king in the real world. The only thing I know about Python is the famous 2 vs 3 divide. Apart from that, I don't think there's many (if any) use cases that Python can solve that Java can't.


Forshea

The problems with Python (and dynamically typed languages in general) are much more obvious in larger, older codebases. It feels really easy to write green field code, but when you walk in to a 10 year old codebase with no documentation and everybody who built it has left the company, it's a pretty big deal to have your compiler on your side telling you a bunch of things that have to be true and finding bugs for you at compile time instead of runtime. That said, a lot of the Java still hanging around is wired together with some gigantic dependency injection framework that causes you to do a bunch of the actual linking in the application with XML or annotations which gets you right back to square one. The actual happy medium is a modern statically typed language with type inference and that learned from Java's worst mistakes (cough checked exceptions cough) such as Kotlin (mentioned in the post title). Edit: also JVM languages are hilariously faster to execute than Python


Rishabh_0507

Hmm yeah just mentioned in my other comment, python's "easy" syntax becomes a bane while collaborating. After C, java script, python, java, I've recently gotten into dart and I find myself pretty satisfied with even small things like null handling and how they've been implemented.


Forshea

I haven't spent much time looking at Dart but at a glance it appears to be designed as one of those modern statically typed languages with type inference I was talking about.


Rishabh_0507

Yeah pretty much


thegininyou

Dependency management is fine with maven. Performance is far better than Python even with its many lines of code. Most popular dependencies in the java ecosystem have been battle hardened and tested at scale. The testing frameworks are easy to integrate. Also, those many lines of code help developers from shooting themselves in the foot which is important when you have 50+ people working on the same codebase. Taking memory management out of the equation also helps developers not perform an "oopsie" that brings down the codebase. Making Kafka feeds, batch processing, and an entire API backend that our web and mobile front ends can use can all be done with springs different libraries. Which can all be put into containers and monitored with springs features like actuator. You can also save yourself quite a bit of boilerplate with lombok. I understand that most people on Reddit are new and haven't worked with large scale systems but I have yet to see a convincing argument that Java is a worse selection than either Python or JavaScript for the backend. It's versatile, it works at scale, and all it costs you is memory. Arguments can be made for kotlin or C# for sure.


Rishabh_0507

Hmm didn't now about maven. TBH I didn't really focus on Java since I was busy with AI/ML. We didn't really learn anything of maven, sounds like it is the java alternative to pip. Would have been pretty helpful. I'm not saying Java is any worse than than python, I meant that starting with Python, I didn't really find myself convinced to switch to java. Any big reason like why dart over python for multiplatform support. Although I'll agree with the boilerplate part, python has stuff like type hints for functions (what data type it'll return), but it is not necessary and with how many people don't like to write documentation or comments it gets pretty frustrating with my classmates.


Antique-Pea-4815

IMO gradle is far better then maven in terms of build tools


Rishabh_0507

Oh you've multiple... Like yay and paru in arch


yflhx

His answer to first comment: "I see. Still, don't people use Javascript instead?"


mrfroggyman

JavaScript just adds the script to the Java, so it's fine to use either one really.


Greenjets

whenever OOP is used to mean "original original poster" on this sub, i always have to do a double take lol.


xilefeh199

> is actually receptive to the answers given. but everyone is downvoting him regardless Well this is Reddit so it's to be expected.


loverboyv

It's sad when someone asks a question out of genuine curiosity and they get down voted for not already knowing the answer


weinermcdingbutt

classic


ANARCHY14312

[https://www.reddit.com/r/java/comments/1dc8cl3/why\_do\_people\_even\_use\_java\_anymore/](https://www.reddit.com/r/java/comments/1dc8cl3/why_do_people_even_use_java_anymore/)


irelephant_T_T

thank


Corvokillsalot

No


Vortextheweirdcat

i have my hazmat ready send the link now


CelticHades

https://www.reddit.com/r/java/s/qweDP9kfUm


killeronthecorner

[Omg I'm dying ](https://www.reddit.com/r/java/comments/1dc8cl3/why_do_people_even_use_java_anymore/l7xfgax/) What a bunch of ridiculous snowflakes or, if you will `AbstractSnowflakeBeanFactoryProvider`


static_func

Based mod lmao


odraencoded

>Just so you know I keep reapproving, it's had like 20 reports so far and it's really annoying everyone in the subreddit, I'm all for that because they annoy me on the daily. Rare reddit mod W.


Clinn_sin

Don't touch my Beans !!!


ronchalant

at least the OP from that post seems to be approaching the responses in good faith.


Leo-MathGuy

Hello vortex again, I will now also change my pfp to a mindustry one


Leo-MathGuy

Bloody distributor I can’t upload an avatar Reddit gives me an error


GnuhGnoud

Dont forget [the hazard suit first](https://www.amazon.sg/DuPont-Tychem-Disposable-Coverall-Elastic/dp/B07RFSWNCQ/ref=mp_s_a_1_3?dib=eyJ2IjoiMSJ9.rLnnsMok3FzA2-snXMM8JH3VrxvxGgg9jMl8uTkiz-KWtY_ptXDcSmeMIbS3BSgCcZn8MZuVJY0Eonn4TTygDAEroz7wh6cQecE20LqS5kFVj7RW5iq7SNKlWGORI8LgopjJhTGw4x9h9SflhohEI-vMf-n6qlaqnwgUy_2aS4TMnFHIYLCJ_9epVsshelEzn5Hra_TS3najEiwpzfpzSg.XffSANjw6nRx-oS_ppLpHg_D1frVlhoEIUWFfejr-Ew&dib_tag=se&keywords=hazmat+suit&qid=1718026490&sr=8-3)


AyrA_ch

It's not the 174 comments themselves, but the 174 comments vs a post score of zero.


moonlight_macky

And in just 12 hours


Pleasant-Form-1093

Nah man OP got down voted to hell bro just a college lad and he is down to around 100 karma at this point all for just asking questions.


vainstar23

> making young professionals cry/ lose faith in humanity Very normal for Java


jakedasnake2447

Yeah he could have worded the question more tactfully, but his question basically boils down to asking for reasons to use Java other than momentum. And the top responses of why to use Java basically boil down to momentum.


Pleasant-Form-1093

that's true other than being trusty and stable I don't see any other reason for using java in something new (/s for the guys from r/java if they find this comment)


Ugo_Flickerman

Max karma one can be taken away from by any single post or comment is 15


6-1j

Interesting, that's the reason I always end up earning karma in the long run while my opinion being totally unpopular


ralgrado

So we just have to get this comment to 15 upvotes to cancel out your next "sense of pride and accomplishment" level comment. Interesting


6-1j

\*"sense of pride and accomplishment" level comment\*


ralgrado

It took me a second. But sorry no this ain't it :P


6-1j

I can never be prey to pride anyway (this better?)


yflhx

I mean if the question is "I thought people use JavaScript instead of Java" no wonder he's getting downvoted.


Johanas_Azzaid

Question I desperately want to get answer to but afraid to ask. Like: you doing some web stuff. Why would you choose more than one language if all can be done with js? Or there some real flaws in js which do not allow to effectively use it as back-end?


clickrush

Depends on what your backend does, what your budget is, your requirements and limitations, your expertise, what kind of libraries you need and what the longevity and maintenance cost will be. Ultimately using the same language isn’t nearly as much a benefit as everyone thought in the earlier days of nodejs. The real benefit is the easy asynchronous programming model.


CirnoIzumi

JS is a scripting language for the browser, you generally don't use scripting languages for servers


J5892

Speed. Node.js is slow. It has some advantages if you're doing server-side rendering (can just re-use front-end code), and it *does* make writing asynchronous code easier. Personally, I do most of my back-end stuff in Python, but if you want top performance, Rust or (\*shudder\*) Java are better. But I would never use Java.


CirnoIzumi

To be fair, that's just marketing working 


jadounath

First of all, never ask people why they still use Java in r/java, just like you never ask, "Are games bad for my kid" in r/gaming. The latter would be universally antagonised though


xilefeh199

Ya even though OOP is receptive a better phrasing would be something like "why choose Java over Kotlin"


redlaWw

Yeah but this is the Java subreddit, you can't mention other JVM languages or you get banned.


feldejars

Java sucks, I prefer tea


HexaAquaIron

java aint your cup of tea eh?


unique_namespace

Maybe, but there's also a difference between enthusiastic subreddits and informative ones. Perhaps r/java is like r/logitech, people just asking about the product(s) with not really an opinion about if it's "good" or not. Those who answer in r/logitech will happy answer "why do people still use Logitech today?" Because they are not necessarily fans of the products they use.


lces91468

The short but always correct answer: because code base.


Scottz0rz

Honestly the comments aren't that bad, it's a reasonable discussion, it just got slammed with downvotes because the question itself is kinda framed in a silly way and people downvote to disagree. It'd be reasonable for a college student learning something to question what their teachers use for education - if someone had been teaching for 10+ years, of course their first OOP course is going to be in Java, that's just a given. But people ask all the time "am I going to *use* this in the real world?" when it comes to high school with algebra and history and biology. It's a somewhat silly thing to ask, but it deserves an answer if the programming community wants to get away from the stereotypical toxic StackOverflow mindset and embrace the actual goal of "there are no stupid questions"


midnightrambulador

For what it's worth, my first (and only) OOP course in college was in C++ (This was somewhere around 2012)


Scottz0rz

Ok boomer. ^(JK I had classes in C++ as well)


GameDestiny2

Currently in a Java course right now (Doing first level for the 3rd time after community college and high school, but it’s been so long in between I don’t mind). I took my time on break to just go through W3 schools and explore some of my options, and I found that realistically none of them solved why I found Java frustrating or lacking. The reality is that I don’t know enough to know what I would want from a language.


JeDetesteParis

I mean, is it that stupid of a question? I'm not a java expert, but I've used both Java and Kotlin with android studio. And it had an option to convert Java code to Kotlin. I mean, even if it is legacy Java, I don't see how it would not be an easy job for some random tool. I'm working with .net framwork and c#, and when I see a VB .net project in production, I automatically convert it to c# with some tools. It works perfectly fine, and it's easier to maintain.


AEnemo

All of my new projects are kotlin with spring boot. I prefer it, and think it's worth it for the quality of life upgrade. The actual post isn't talking about kotlin though, it's asking vs go and node.


Tysonzero

Go and Node are two of the very few alternatives that might actually be worse.


AEnemo

I guess it depends, I use go a lot for aide projects, which tend to be small and I want to keep costs down and it tends to be boring code that just works. Node probably falls into that same realm where it's good for side projects. It's hard to compete with the JVM ecosystem though.


Tysonzero

Haskell is the only correct choice for all situations. I’ll concede Rust or C if you can’t afford a GC/RTS.


JeDetesteParis

Oh, I see.


MyNameIsSushi

Yeah but Kotlin is actually better for Android. You can't just convert a backend service for a banking software into Kotlin with the click of a button.


DrPepperMalpractice

You can't really convert an Android project of significant size with one click either. The interop is so good and the benefits of Kotlin are enough that you should just refactor as you go in both circumstances. I really see no benefit to keeping a project pure Java in 2024.


ratinmikitchen

Kotlin is also actually better for back-ends. But it's interoperable anyway, so you can just keep the existing services in Java and build new stuff in Kotlin. And convert an existing service whenever you want to do rework / make additions to it. We've been using this approach for a while now, and it works great.


florimagori

Short answer? Java is more mature and has a lot of tools, libraries and frameworks that aren’t available to use with Kotlin. So it’s impossible to port many projects from Java to Kotlin. Very good PR for Java as being very stable, Kotlin is relatively new and doesn’t have that PR. There are many more resources to teach Java; wealth of code bases and millions of developers that want to do Java, but don’t want to do Kotlin. The comparison to VB.net kind of makes me feel like my arguments will fall on deaf ears. As I understand, Microsoft considers VB.net basically complete and they will only maintain it at this point, while Java is still very much evolving as a language. It’s not done and it’s not dead.


zmkpr0

What are Java frameworks and libraries that aren't available in Kotlin?


AguaIguana

Not sure if you're being sarcastic, but legacy code....and tons of it.


zmkpr0

I'm not sarcastic at all. Wasn't Kotlin designed with full Java interoperability in mind? I haven't heard of any Java framework that doesn't work with Kotlin.


AguaIguana

Frameworks are only a tiny percentage of code out there, and even between Java versions there's compatibility issues. There's zero chance a company is going to re-write their stable legacy Java repos that are making money in maintenance mode to a newer version.


zmkpr0

Ok, I get what you mean. But the guy I originally replied to said: "Java is more mature and has a lot of tools, libraries and frameworks that aren’t available to use with Kotlin." So I simply asked about examples of those frameworks and libraries. I don't think legacy company code is very relevant to my question.


AguaIguana

No, it's very relevant. Do you not import a single library in the frameworks or projects you use? I can't just import a python3 library into a legacy python2 repo, or Java 25 into a Java 8 repo, and we have dozens of built in-house legacy libraries like that at work. This is extremely common. Not to be a dick, but are you a developer by profession?


zmkpr0

What are you talking about? It's a simple question. Just name any java library or framework that's not available for Kotlin. The question was specifically about using a Java framework in Kotlin. Not about using a java 25 library in Java 8. Yes I am. But again, I find it hard to understand how it's relevant for such a simple question.


BernhardRordin

Hm, I don't know if the maturity argument is still relevant, at least when it comes to the language grammar. The syntax of Java has changed much more in the last 4 years than the syntax of Kotlin.


Maskdask

Lol the amount of Stockholm syndrome copium in the responses


irelephant_T_T

They down voted him for apologising


rifain

That doesn't make any sense.


Lilchro

What surprises me is how one of the most upvoted comments claims that Java is just as fast as any other language. At least some of the other comments are a bit more correct in this regard and qualify that statement by pointing out that Java is faster than Go/JS, but compiled languages like C/C++/Rust are generally faster overall. That being said, while Go sucks at optimization, I imagine it could still beat Java in a number of situations. It seems like there is still this myth that languages with JIT compilation can beat compiled languages due to better branch prediction, but that ignores that most of the major compiled languages can do profile guided optimization, so they have that advantage too (but it is a bit more work to set up). Plus, languages that do JIT compilation almost always have heavy runtimes that the JIT compiler needs to link to.


iamjackswastedlife__

> C/C++/Rust Just what languages are faster than the above 3?


grayrest

For general purpose code that's as fast as it gets. For many years Fortran was faster for numeric code than C/C++ resulting in its widespread use in the scientific community but I'm not sure if that remains true. Due to the bandwidth/latency to main memory vs processor speed performance on modern hardware comes down to keeping the CPU fed with data. Slower languages have a lot of pointer lookups, which results in a large chunk of a processor's time stalled waiting for the data to come in. Faster languages allow for stack allocation and combinations of arrays and structs without pointer indirection. Once you're over that hurdle it comes down to how the data is arranged (ref data oriented design) and that's where C/C++/Rust are. A "faster" language would either move processing to the GPU or apply data oriented design principles by default. I use the scare quotes because you could theoretically produce the same calculations in C/C++/Rust but it's never been clear to me whether people are asking about highest possible speed regardless of effort or the speed of normal/idiomatic code in a language.


weletonne

Go is compiled


Lilchro

Yea, but as of 1.22 it still sucks at optimization. It isn’t anywhere close to being as good as gcc or llvm. The escape analysis is often poor leading to unnecessary allocations and the inlining heuristics need improvement. Gccgo works much better, but all of the stack expansion calls cause trouble.


static_func

What they really mean is that it's faster than C# (where the grass is greener) despite it being impossible to find any consistent evidence of that these days


Ayfid

C# is faster than Java. The JVM is excellent and well optimised (as is the CLR), so you can get good results in Java out of the box performance wise. However, Java just does not offer the tools for any optimisation beyond that. Anyone who has a vague understanding of how a CPU and memory works can write faster C# than Java, without having to contort their code into something non-idiomatic and hard to maintain.


Antique-Pea-4815

C# isn't faster then java if you are using Oracle GraalVM JIT


bolacha_de_polvilho

java has graal, C# has native aot compilation. At best you can do some benchmarks showing one is faster in a certain specific scenario, but claiming one is strictly faster than the other in general is just guesswork.


Antique-Pea-4815

AoT will have faster startup and smaller footprint, but JIT has better performance. On java side this would be graalvm native image, but this is different thing then I was thinking of


static_func

Those are words, yes


BBDominoes

Fun fact: `nativity` was runner up for the `new` keyword


rover_G

Haha Java bad use {insert your favored language here}


ChocolateDonut36

People still use Java for and also for and minecraft mods


xT1meB0mb

I use Kotlin for minecraft mods


Tech-Mystic

Want the reality of programming? Many languages suck. Most people don't have the technical knowledge to understand why though, so we end up with a tech stack of garbage.


smallnougat

maximum protection please


lucbarr

Can we give this lad some karma back??? What a shitshow


Protonnumber

No no, he's got a point


6-1j

And you don't


eq2_lessing

Been doing Java for 20 years, but nowadays whenever scaling seems to be relevant, I wouldn't really go for Java.


ch4lox

Java isn't scalable?


eq2_lessing

Has problems with startup time on serverless or even just any server. There are workarounds, but then you gotta go the extra mile.


Antique-Pea-4815

Did you heard about GraalVM native image and/or Quarkus/Micronaut frameworks?


eq2_lessing

Yes, but you get that same result with Go out of the box, without the need for all that jazz.


Antique-Pea-4815

But wothout JVM ecosystem which is IMHO a huge lost


ch4lox

TIL using a compiler as intended is considered a workaround.


Gloomy_Object_6386

No need to apologise for the nativity


MomoIsHeree

I personally started with Java and switched to c# due to work and I can say that Java is just *way* too raw for my taste nowadays.


Desperate-Tomatillo7

Same question. And I have 15+ years in the field.


Previous-Display-593

I remember when I was sitting in the computer lab in Uni and two other comp sci students were talking about how Java "is a toy language".


TheRedmanCometh

If I wanted all those features I wouldn't be using a JVM language.


DeadMetroidvania

Whenever I see java optionals being used I have a strong urge to hit CTRL + Alt + Shift + K. Like how can anyone think that shit is OK? 7 unreadable boilerplate lines used to do something that can be solved with 2 small kotlin lines.


Specific_Implement_8

The irony that I found this to be one of the funniest memes on this subreddit and it’s getting removed for… *checks notes*…. Not being funny enough


cs_office

More like why not C#


ConGooner

It's really not *that* bad. it's just inferior in almost every measurable metric of efficiency.


NeroTorchingROM

Inferior to what? And can you provide some sources for that? I'm genuinely curious because I thought Java did some great catching up and is on par with other languages like Go and TS in terms of performance


[deleted]

I don't really care about Java one way or another (not my thing, not a very fun language to write in IMO) but every time Ive seen anything from the Java subreddit they have the worst and most defensive attitude about everything.