News for hackers. Stuff that matters.
Re:Functional programming is not popular because it is weird... by CraigJPerry on Tuesday September 14, 2021 @03:20AM (#28521405)
Two counter points spring to mind:

Python - which took perls lunch over a decade or so and now in more recent history became the obvious language when data scientists and ai/ml practitioners needed to adopt a platform. Its popularity has even led to it also expanding into education in a huge way after Python became the most popular scripting language.

Java - the jvm is an utterly amazing piece of engineering and yet still to this day most people still write java instead of the other better languages (kotlin, scala, clojure) hosted on that platform, and they deploy only to Linux environments. The platform with its write once run anywhere and industry leading garbage collector that gets better than 50% memory utilisation, isn’t the thing that attracts people - its the language.

Functional languages used to be the cool thing before object oriented design came along and unlocked the ability to build bigger systems. The ultimate programming language (lisp) has always encourages functional since what, the 60s?

Re:Functional programming is not popular because it is weird... by virgilp on Tuesday September 14, 2021 @03:33AM (#28521489)
I would argue that python's popularity comes with numpy/pandas, jupyter notebooks, and the recent popularity of AI/ML/data science. Yes it's useful in other areas (flask and django are somewhat popular) but nowhere near as popular as its use for ML.

Scala actually became MUCH more popular with Spark. I think the original point stands - the platform pulls the language.

Java is popular due to the jvm - it was the first jvm language after all. It got popular before others like scala & clojure managed to get off the ground, at all.

Re:Functional programming is not popular because it is weird... by WastingMyTime89 on Tuesday September 14, 2021 @04:34AM (#28521889)
> I would argue that python's popularity comes with numpy/pandas, jupyter notebooks, and the recent popularity of AI/ML/data science.

Python was hugely popular long before these were a thing. It was already seen as one of if not the most beginner friendly language at the beginning of the 2000s. It became the language of choice for ML because it was already popular with beginners not the other way round.

Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:31AM (#28522245)
Yes, before Django there was Zope.
Re:Functional programming is not popular because it is weird... by CraigJPerry on Tuesday September 14, 2021 @05:33AM (#28522264)
>> Java is popular due to the jvm

That's not how history played out at all. Java spent much of its life being pitched as a way to make C++ developers more productive.

The jvm was actively hated by many for years - slow startup times, excessive memory usage, it didn't used to enjoy the rich tooling ecosystem it has now and it was seen as opaque and hard to tweak for performance.

To this day it's not that hard to find Java devs who want off the hotspot jvm - whether that's to go onto other JVMs with different tradeoffs (Azul or whatever) or whether to go native compilation (GraalVM) instead.

Re:Functional programming is not popular because it is weird... by virgilp on Tuesday September 14, 2021 @10:19AM (#28525219)
I wrote another comment where I explained "popular due to jvm" better - the productivity gain was real, but came from the GC which was....JVM. No, the JVM wasn't hated initially - not until it became hugely popular and people started pushing it to the limit. Or well, at least that's how I remember the history, I might be wrong; human brains are notoriously fallible and I'm too lazy to search and validate/confirm my version of it :)
Re:Functional programming is not popular because it is weird... by somejan on Tuesday September 14, 2021 @06:07AM (#28522498)
Java nowadays is mostly used for business applications, where developer productivity is more important than runtime performance. Java being memory safe is a huge part of that, which is the JVM platform. Java the language had the major feature of being superficially similar to C++, that helped take over the business market but is now no longer relevant. When Java was first marketed as a business application language there were few competitors. Nowadays there are, but nowadays the major reason to choose Java is because it is entrenched and good enough.

However all the Java shops I hear about are also looking into Kotlin at some level of adoption. From all the new JVM languages Kotlin integrates the best with the existing Java environment and for displacing a language in an existing niche an easy upgrade path is the most important. So I think Kotlin will become an important language in the JVM ecosystem, it will just take a long time because these types of businesses are conservative in their tech choices.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @02:05AM (#28535770)
> Java nowadays is mostly used for business applications, where developer productivity is more important than runtime performance

I fail to think of any other platform that could run these monstrosity CRUD enterprise apps as fast as the JVM can. Sure, C++ can be written to utilize hardware better, but with all the classes and interfaces around with everything being virtual, a good JIT compiler can skip method lookups over AOT compiled languages.

Re:Functional programming is not popular because it is weird... by fulafel on Thursday September 16, 2021 @02:20AM (#28548676)
> Java nowadays is mostly used for business applications, where developer productivity is more important than runtime performance

While both of these things are true, they not connected in the way you imply, since Java is a pretty low level language by today's standards.

In the Java school of business app engineering, writing the code is rarely a big part of the effort, so it doesn't matter if the langugae is not very good or expressive. Java wins at having a big commodity-like labour pool of programmers, and there's a lot of inertia and stability in the platform.

There are of course a lot of people who use more expressive and creative tools in making business apps, like eg the many companies using Clojure, Scala, Ruby, Python etc for them, so it's not the only way to skin the cat.

Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @07:43AM (#28523215)
Kotlin's future is tied to Android.

On the JVM it is like trying to replace C on UNIX.

Re:Functional programming is not popular because it is weird... by code_sloth on Tuesday September 14, 2021 @03:08PM (#28529471)
Both of my last 2 large bank gigs (kind of the last places you'd expect cutting edge tech) were going all in on Kotlin. New projects were Kotlin only, and there was active work on sunsetting/migrating Java applications towards Kotlin. None of these were Android applications.

Sure, this is anecdotal. But I'd say the same of Java's dominance in the JVM space. Java's continued dominance is not a sure thing from my vantage point.

Re:Functional programming is not popular because it is weird... by pjmlp on Wednesday September 15, 2021 @01:12AM (#28535495)
JVM is written in a mix of Java and C++, let me know when they start rewriting it in Kotlin.

Groovy was all the adoption rage across German JUGs back in 2010, then everyone was going to rewrite the JVM in Scala, or was it Clojure?

Now a couple of places are adopting Kotlin outside Android, nice, eventually will migrate back in about 5 years time.

https://trends.google.com/trends/explore?q=%2Fm%2F07sbkfb,%2...

Re:Functional programming is not popular because it is weird... by code_sloth on Wednesday September 15, 2021 @07:29AM (#28537744)
> JVM is written in a mix of Java and C++, let me know when they start rewriting it in Kotlin.

This is less relevant today. The host blessed languages do have an advantage, but I would not say it is insurmountable. It might have been the case in the past, but the modern JVM is a platform, it is no longer a glorified Java language interpreter.

> Now a couple of places are adopting Kotlin outside Android, nice, eventually will migrate back in about 5 years time.

Maybe. Maybe not. Most developers I talked to that have experienced the transition do not want to go back to Java.

This isn't to say Java will die. It will continue to thrive. But Java dominance (on the JVM or as a whole) isn't a sure thing anymore.