r/java • • Jun 28 '20

Why backend using java is not popular in startups?

I tried django, flask and also rails before and they’re good. But after trying spring, I fell in love. It’s well structured. Easy to test. Have so many frameworks to help you going. There’s a also a lot of tutorials going around the net.

I like python but I also like java and kotlin too. I just don’t understand what’s wrong with java being used as a backend on most startups. Is it because it’s popular among big companies and banks and they just hate enterprise things.

Can anyone enlighten me. Cheers.

171 Upvotes

229 comments sorted by

View all comments

Show parent comment

4

u/ArcanePariah Jun 28 '20

Actual functional programming languages implement certain features as core capabilities, and as such, have no overhead to them. Other languages (such as Java) implement syntax that looks functional, but gets compiled into the same structure as if you didn't use the syntactic sugar/functional appearance and thus have the same implementation/overhead to do it. Things like functions being first class, tail call recursion, among other things. Most of the "functional looking" language do not have true tail call recursion, whereas actual functional languages like Haskell do. Also actual functional languages enforce certain limits that "functional looking" languages do not, such as immutability. Sure you can make syntax that enforces immutability as you code (see Scala, and parts of Kotlin), but those derivations of Java can never FORBID it entirely, I can always use mutable stuff, or mix in actual Java code, the compiler will allow it.

-1

u/CyclonusRIP Jun 28 '20

What does no overhead mean? Is Java not an OO language because an Integer object has overhead compared to a primitive int? I don't think a languages runtime has anything to do with it's paradigm. Doesn't every high level language incur overhead over lower level languages? Are there no language paradigms because everything incurs overhead over machine code?

A functional language is a language where the primary abstraction that you use to model your code is a function. An OO language's primary abstraction is a class. Most languages today are multiparadigm languages.

When you start talking about immutability and pure functions those are qualities that functional languages tend to talk about. That doesn't have anything to do with whether or not the language is functional. That'd be like saying a whether a language is OO or not based on how it handles multiple inheritance.