Java is getting better each year plus Kotlin works in the same eco system and is hyper popular. I don't think that Java will wither any time soon.
Programming
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
I really like Kotlin, I would much prefer using it at work instead of Java
It sure is! We moved a few years ago and no one regrets.
Advertising it on work is not an option? Because the technical barrier to change language inside the JVM ecosystem is quite low.
Kotlin is a very easy transition, and it sorts out a ton of issues that you find in Java. Certainly easier than moving to Rust.
Java gets a bad reputation from proponents of FOMO/fad-driven development, but the whole Java ecosystem was built for the web. Anyone is hard-pressed to find a better tech stack than Java-based frameworks without resorting to hand waving and passing personal opinions as facts.
I love C# and the whole .NET Core ecosystem, but even I have to admit it's very hard to argue against java.
fad-driven development
This is certainly a way to dismiss all other programming paradigms, I suppose. Also, having used both C# and Java, I can't see myself writing another backend in Java again when C# is such a pleasant language to write in. Both languages have flaws of course, but I find C#'s significantly more tolerable than Java's.
Exactly. The only reason Java is remotely tolerable today is because of influences from those 'fad' languages. Kotlin and Scala were also fads when they came out, they just got adopted because Java was utter shit at the time. Hell, even Java was a fad at some point in time.
I think a strong argument could be made for the JVM as a whole to be honest, since it encompasses several languages. That being said, I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.
I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.
I worked with really Big Bank who have their whole backend written in kotlin. It was such a great thing to witness because usually financial institutions don't give a fuck about clean code and modern programming languages.
I’ve been using ktor in a personal project and it’s been a joy; all the familiarity of Spring but with Kotlin first.
Also, I know that Amazon has started to switch some projects to Kotlin, since they’re such a large Java shop: https://aws.amazon.com/blogs/opensource/adopting-kotlin-at-prime-video-for-higher-developer-satisfaction-and-less-code/
Amazon has been adopting a lot of languages in recent years, including writing services in Rust and C# to my knowledge. It's cool seeing them branch away from Java, although I know that internally they use their own flavor of Java (Corretto).
That being said, I'm not sure I've seen a backend written in Kotlin despite how prominent it is for app development.
That’s funny because as a backend Kotlin dev I literally haven’t seen an Android app written in Kotlin (at any of the companies I’ve worked at) but have worked since 2016 with Kotlin on the backend.
Before google announced support for Kotlin the split was massive. Most apps were backend with only a fraction Android. And Kotlin wasn’t even originally built for Android. It only happened to work and then it got popular after someone reported a bug on Android and they fixed it.
I can’t describe it. Java is a good language. I just don’t like it, don’t want to write it, am sick of dealing with its build tooling, and have worn thin of all the IDE’s-do-all-the-work-for-me mentality. Good Java programmers are excellent but they are eclipsed by an army of people that haven’t any idea how it works… in my experience.
Just use scala or any other decent JVM language then :)
I don't see it withering away anytime soon. My entire career has been enterprise web development (which is why I roll my eyes at all the web dev rants). Every company I've worked at has used Java on the backend and some JS framework for the frontend. Java has only been improving in that time and getting much easier to write. I don't see companies taking an (in their view) unnecessary risk that makes it harder for them to hire and lose efficiency, at least in the short to medium term.
I think the only way that changes is if developers are interested enough to try Rust, or any other language, in their free time. If they like it enough, they'll suggest it at work. If enough developers are doing that, it'll slowly shift the local scene.
For me it has been the same except replace java with c#, I can argue that golang might soon be admitted into the "serious backend language club".
For how much crap people give java and c# they are languages you can get shit done in, fast , efficiently and stable.
I’m surprised no one has mentioned golang. We have the usual dichotomy of java and rust but there’s a very very good option for those who are worried about rust adoption.
I vastly prefer writing rust code but go on its own gets you very very similar performance at the cost of developer experience. I think sum types are the #1 requested feature so once that comes I’ll be a much happier boy.
I think Golang had the potential to take over just because it's so easy to pick up and start contributing.
My last position was Golang focused and our hiring was never focused on experience with the language because we knew that if you understood programming concepts you would succeed in Golang.
Today, I'm working on Rust and while I enjoy it for what I'm using it for (Systems level instead of Web Services) I'd be hesitant to suggest it for most backend application just due to the ramp up time for new developers.
tl;Dr Golang will have an easier time hiring for because no language specific experience is required.
I’d be hesitant to suggest it for most backend application just due to the ramp up time for new developers.
I would probably suggest Rust for that exact reason, you'll have to fight the language a little bit at the beginning (at least if you'll have a very "interior mutable" experience instead of a functional background), but it teaches you how to write your code in a nicely relatively uniform compositional safe style, that IMHO can be read quite well between different people (team) and I think is easier to review (as long as it's not some super magic trait-heavy/proc-macro code of course, but I think for actual applications (vs libraries) that part will be rather low)
Also I think nowadays the barrier into the language is much lower than it was a few years ago. The tooling, specifically rust-analyzer (and probably Intellij Rust too, never tried it though) and the compiler itself got really good in the meantime (I actually think Rust-analyzer is by now the best LSP for any language I know of), so that getting into Rust is likely not that hard anymore (you'll have to learn/understand a few concepts though, like heap/stack and the lifetime system, but I think that it's not that hard to learn).
Go just often feels very hacky to write with a lot of quirky things like handling errors, and a lot of missing features like pattern matching or a relatively good type system, I don't think it really promotes that nice architectures (or limits the programmer kinda).
Yeah it’s pretty crazy how fast you can get going in go. As long as you are aware of a pointer you are mostly good to go.
Just wish it felt better 😫
I'm on the boat that rust is a bit more cumbersome to write that Java/C#. I work in .Net and I really want to give Kotlin a go now.
I guess I'll just have to wait for MS to add the current trendy feature to C# again for the sum types though lol.
I think that India will be a major factor and there are many Java developers. C-level guys don't care about programming languages, they do care about cheap labor. So I don't think that Java is going to wither away anytime soon, at least on a global scale.
This was said 20 years ago and none of it was true. Outsourcing is big but we don't outsource our highest level jobs. The typical architect role or senior engineer roles
Unless it's a 10-man startup, a typical company doesn't employ exclusively architects and senior engineers.
By the way, I think it's quite arrogant to think about this in terms of outsourcing and "we". "We" might not outsource everything, but there's a huge market with a lot of potential beyond borders where "we" are located. That's why I explicitly said:
I don’t think that Java is going to wither away anytime soon, at least on a global scale.
I think that .NET will be used more and more instead of Java, because C# is similar to it, but better¹. And there is also F# which is great too². Rust and JS³ might also get some more usage in backend.
¹The only thing missing is union type.
²And has union type :D.
³And that's unfortunate because I don't like JS.
Enterprise software dies very very slowly ... so i'd expect java to stick around for a long long time. And since i regularly see new software projects with java ... i am not even sure if it is dying or not. ... i personally would like to see it gone ... but i think it is unlikely that i'll have the pleasure of seeing that during my lifetime.
This is the real answer.
There are still, in the year 2023, Cobal developers graduating and getting hired to work on software.
My alma mater’s website runs on PHP.
The investment to flip even a microservice from one language to another is REALLY high, and most companies won’t pay unless there’s a significant pain point. They might not greenfield new projects with it anymore - but it will still be around effectively forever.
I’ll throw my 2¢ in on TypeScript → JavaScript. The typings accelerate development significantly (if the developer doesn’t fight them and make everything any
), and you can write to modem JS when you have older runtimes.
But more you can do full stack from cloud infra (Infrastructure-As-Code with something like AWS-CDK or CDKtf) to deploy and orchestrate front-end to back-end.
Yeah but the ecosystem drags it about as far down as you can go.
Backend development for large applications relies on stability, the JS ecosystem has anything except stability.This is okay for FE development where you naturally have a lot of churn.
It's a reasonable expectation that a backend built today should be maintenance free and stable over the next 5-10 years if no more features or bugfixes are required. And is buildable, as is, anywhere in that timeframe with minimal or zero additional work.
Additionally, strong backends in the same ecosystem are similar, they use similar technologies, similar configs, similar patterns, and similar conventions. This is not the case for JS/TS backends, there is incredible churn that hurts their long term stability and the low-maintenance requirements of strong enterprise, and even more importantly small businesses backends.
Mature ecosystems provide this by default this is why C#/Java is so popular for these long-standing, massive, enterprise systems. Because they are stable, they have well established conventions, and are consistent across codebases and enterprises.
This is a perspective most devs in the ecosystem lack, given that half of all developers have < 5 years of experience and the vast majority of that is weighted into the JS ecosystem. It takes working with systems written in python, TS, JS, C#, Java....etc to gain the critical insight necessary to evaluate what is actually important in backend development.
Edit: to be clear this isn't just shitting on JavaScript because that's what people do, I work with it everyday, TS is by far my favorite language. 2/3 of my career is with JS/TS. This is recognizing actual problems that are not singularly solvable with the ecosystem that pulls down its liability for backend development. There are languages and ecosystems are much better for your back end it's not that scary to learn a new language (many of my co-workers would disagree it's not scary 😒)
Python is already popular so Mojo making that ecosystem much faster, safer and easier to deploy could be game changing when it's fully formed. There are also armies of existing Python developers out there for businesses to tap into and it's an easy language to pick up.
On their roadmap page, it looks like C++ interop is going to be a first class citizen too, further opening up the ecosystem to existing high performance libraries:
Integration to transparently import Clang C/C++ modules. Mojo’s type system and C++’s are pretty compatible, so we should be able to have something pretty nice here. Mojo can leverage Clang to transparently generate a foreign function interface between C/C++ and Mojo, with the ability to directly import functions:
from "math.h" import cos
print(cos(0))
I don't think many large established companies will be taking the risk on newer languages, but there are plenty of new companies that will mature based on a foundation of writing their backend in Rust or some other new language.
Probably some Rust contingents will form on internal teams within large companies, and they will build new products or services in X new language.
I give typescript running a decent shot of being a major force in backend APIs. There’s a draw to being able to code the same language on front and backend. It’s got a stronger type system than Java in strict mode as well.
It also has quick boot time which can help in cloud functions that may eventually become the preferred method of APIs. No server or os to maintain and they are close to the customers location
My team is trying to shift away from Java towards a TS backend. Call us stupid but our current Java stack is a nightmare to work with.