News for hackers. Stuff that matters.
Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @02:48AM (#28521179)
Languages do not becomes successful due to their intrinsic qualities. Languages become successful when they are coupled to a successful platform. E.g. C became popular because Unix became popular, JavaScript became popular because of the browser, Objective-C became popular because of the iPhone and so on.

Therefore observing that a language or paradigm is popular or unpopular does not say anything about whether it is good or bad. JavaScript is the most popular language in the world. If Netscape had decided to use a Scheme-like language or a BASIC-like language it would still be the most popular language in the world. So paradigm has nothing to do with it.

Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language.

I don't buy that functional languages are unpopular because they are unintuitive. Losts of stuff in JavaScript is highly unintuitive. It didn't prevent it from becoming the most popular language in the world. People will learn what they need to learn to get the job done.

Re:Functional programming is not popular because it is weird... by smokey_circles on Tuesday September 14, 2021 @03:31AM (#28521480)
>Languages do not becomes successful due to their intrinsic qualities. Languages because successful when they are coupled to a successful platform.

That doesn't seem right. There are plenty of languages that are born from platforms, but I'm skeptical that its anywhere near the majority. Some platformless examples from the top of my head

- Java

- Rust

- Python

- C++

- Go

- Lua

In my opinion: C is not popular because of Unix. Unix is popular because it's written in C. The same is arguably true of Kubernetes. Neither docker nor k8s drove mainstream adoption of Go. Go did that with it's own properties, the same is true of Rust and C etc.

> Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language.

The question here though is why?

The author argues because FP is unwieldy for the general software case (which I assume is enterprise CRUD apps). And I have to agree: State management is a huge part of CRUD apps.

------

EDIT: I am not presuming K8s is popular because of Go. The argument here is the success of the platform and choice of language are related, not directly consequential. K8s could have been written in rust and would probably be as popular because of its feature set

Re:Functional programming is not popular because it is weird... by ajuc on Tuesday September 14, 2021 @04:33AM (#28521884)
Java was the only way to write applets and code for feature-phones early on. Nobody thought of writing application servers in java in early 90s, java was supposed to be the way to write code for internet of things.

C++ was the easiest way to write kinda-OO code and use C libraries. Then it became de-facto standard for gamedev and desktop app programming.

In Linux world it's still the case that if you want to write a desktop app you should write it in C/C++. Use any other language and you will struggle against the dependency management and package managers forever.

Python is the only clear example of succeeding without a platform out of these languages, and the fact that after decades still Python is less popular than PHP shows that historic accidents and having a good platform is more important than any quality of the language.

On the other hand Perl is dead so maybe it's not as bad :)

Re:Functional programming is not popular because it is weird... by analog31 on Tuesday September 14, 2021 @07:50AM (#28523277)
For a lot of users, Python is its own platform. As a so called "scientific" programmer, when I'm programming, I'm very much "inside" Python. I don't need to know or care very much about the details of the platform that it's running on. I start up my IDE or Jupyter and the rest of the system melts away.

This may be because Python lends itself to bring used in integrated environments such as Jupyter.

Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:21AM (#28524358)
>Java was the only way to write applets and code for feature-phones early on.

That's not how it got its popularity. Applets died very soon (the novelty lasted like 1-2 years), and feature-phone apps were never a big thing. Unlike e.g. mobile apps that quickly overtook the desktop, feature-phone J2ME apps at the time were a peanuts business (and there were other ways, like native APIs from Palm, Blackerry, and Windows mobile edition - of yore, not their post-iPhone smartphone OS).

Java, even back in 2000, was big in the enterprise space and remained so (which is why Sun quickly emphasized that and let the applet sdk languish).

Re:Functional programming is not popular because it is weird... by KronisLV on Thursday September 16, 2021 @04:41AM (#28549417)
> In Linux world it's still the case that if you want to write a desktop app you should write it in C/C++. Use any other language and you will struggle against the dependency management and package managers forever.

I do agree in a very general sense, but there are definitely a few good options or there for desktop software.

For example, Lazarus/FreePascal is one of the best solutions for writing GUI apps even nowadays. It's a shame that it's dead as far as market share is concerned, even if it has a community around it, is open source and still receives regular updates with pretty good platform support.

Though i guess you could say the same about any technology stack that produces executables that are for the most part statically linked and don't complicate dependency management.

Of course, Java with Swing also hasn't disappeared anywhere and is still perfectly capable of producing most desktop software as long as there is any sort of a JDK or JRE on the device. There's also JavaFX/OpenJFX which is supposed to be more modern, but I've experienced more issues with it in comparison to Swing.

Re:Functional programming is not popular because it is weird... by brongondwana on Tuesday September 14, 2021 @05:38AM (#28522299)
For all that, you can still get an awful lot done in a dead language!
Re:Functional programming is not popular because it is weird... by amitport on Tuesday September 14, 2021 @05:43AM (#28522337)
The (excellent) libraries are python's platform

I would have avoided python if I could... But I can't avoid numpy/scipy etc etc

Re:Functional programming is not popular because it is weird... by Kinrany on Tuesday September 14, 2021 @08:20AM (#28523585)
Was Python's package management unusually good compared to other languages at the time?
Re:Functional programming is not popular because it is weird... by pram on Tuesday September 14, 2021 @11:17AM (#28526133)
Depends on the time, CPAN was far better than setuptools. It was even better than dealing with RPM, early on.

RubyGems was the package manager that was really amazing and changed everything IMO. pip didn’t even exist until almost a decade later after that.

Re:Functional programming is not popular because it is weird... by bonzini on Tuesday September 14, 2021 @09:02AM (#28524097)
Python took the shell scripting platform from Perl just like PHP took the web scripting platform. It then extended to web servers (e.g., Django as an alternative to Ruby on Rails) and ML, but that was later.
Re:Functional programming is not popular because it is weird... by virgilp on Tuesday September 14, 2021 @03:36AM (#28521515)
For Java, JVM was the "platform". I still remember learning Java in university - what left an impression on me was that my first ever university homework where I used Java (i.e. non-trivial project) ran perfectly on first successful compilation [+]. GC is huge help, especially if you don't use smart pointers (which were far less prevalent at the time).

[+] to clarify, I was a somewhat experienced programmer, this was one of the final year projects, for distributed systems or parallel computing I believe. A simple system without doubt, but still, a system not a "hello world". Something that I wouldn't have expected to work on first try, had it been written in C.

Re:Functional programming is not popular because it is weird... by tialaramex on Tuesday September 14, 2021 @12:58PM (#28527577)
Yes. I like this in Java, and in Rust, and it's annoying for me in languages like Python where you mostly don't have this. I want the compiler to tell me my program is nonsense, so then I can fix it, rather than wait until the program has done most of its work and then, oh, did you notice this needs to be an integer but you provided a string? Sorry, program crash, fix the bug and run the whole thing again.

But of course although it's the default in Java, and not provided out of the box in Python, I also wrote some web framework stuff that adds these runtime errors to Java (by using Reflection to make decisions at runtime instead) and I've seen Python code with more type safety that would tell you earlier that there's a problem. So it's ultimately not only a matter of programming language although that does definitely set the tone.

Re:Functional programming is not popular because it is weird... by native_samples on Wednesday September 15, 2021 @06:43AM (#28537484)
I think platform in this argument is meant to mean something users obtain and install apps (or websites) into. The JVM is not a platform really, it's a runtime. For a while the JRE was sort of a platform because users downloaded it separately, but that hasn't been true for a long time and yet Java is still popular.
Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @03:43AM (#28521560)
It is almost forgotten now, but the platform which carried Java to critical mass was the browser. Java successfully pivoted to server-side, but initially it was considered a client-side language.

C++ was the preferred application development language on Windows.

Python is popular because of the numeric and ML ecosystem.

Re:Functional programming is not popular because it is weird... by tragomaskhalos on Tuesday September 14, 2021 @03:54AM (#28521632)
I would say that in the enterprise software world Java was an irrelevant toy before the pivot to server side. At that point though, whoosh stratosphere
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:17AM (#28521764)
I'm not sure that's quite right. I feel like there was a decent span of time where many desktop apps were written in Java (with AWT or Swing), particularly enterprise apps where you valued development speed and ease of deployment more than a slick UI or high performance.
Re:Functional programming is not popular because it is weird... by mannschott on Tuesday September 14, 2021 @03:19PM (#28529642)
My $JOB is maintaining such a desktop CRUD app that's been in use for the past 20 years. It uses a Swing (via a proprietary higher-level framework) for its GUI. Over the years it's accreted a few dozen services (also in Java) in its orbit, but the central GUI app and its data-base still remain and continue to be extended as new requirements arise.
Re:Functional programming is not popular because it is weird... by SergeAx on Tuesday September 14, 2021 @06:45AM (#28522741)
Python is popular because their teach it in US schools and colleges as a next best thing after BASIC int terms of ease. During ML uprise Python became a common denominator between mostly US-based scholars.
Re:Functional programming is not popular because it is weird... by thaumasiotes on Tuesday September 14, 2021 @05:11AM (#28522110)
> It is almost forgotten now, but the platform which carried Java to critical mass was the browser.

I'm still confused by the cycle of

- You can run Java applets in a web browser!

- Ew. Time to stop doing that.

- I've had a brilliant idea! We need a bytecode-based VM in the browser so a web page can run arbitrary code.

- I'll call it "WebAssembly".

Re:Functional programming is not popular because it is weird... by TeMPOraL on Tuesday September 14, 2021 @05:35AM (#28522277)
Other than security, the other bad thing about applets was that they were very slow to start, and required a Java runtime that did not come bundled with the browser - you had to download an installer for it manually, install it, and then the thing was constantly nagging you about updates (and, IIRC, the updating agent or whatever it was that sat in my tray noticeably degraded the machine's performance even if nothing was using JRE).
Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:34AM (#28524545)
Here:

- You can run Java applets in a web browser!

-> Yeah, so? There are all crap, slow to start, big on resource bloat, slow to draw, and don't offer much).

-> Ew. Time to stop doing that.

Then 15+ years passed, during which JS became the dominant way to build CRUD/Enterprise/form-based/and more apps, got big features (from WebRTC to an embedded DB, and from accelerated canvas and 2D graphics to MIDI). And it even hit big on the server too.

Then: - I've had a brilliant idea! We need a bytecode-based VM in the browser so a web page can run arbitrary code.

WebAssembly, is faster than Java Applets was back then, has easier ties to the DOM for UI (as opposed to being a sandbox), can be used to supplement conventionally written web apps, and is not tied to a single company.

So, quite a lot of differences due to time, and also in the characteristics of the technologies involved.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @01:51AM (#28535705)
Well, it’s not hard being faster than 20 years old tech. Also, webassembly still doesn’t have proper bindings to the DOM (and seriously, at the time we could be happy that a static DOM could be displayed), and java is one of the very few languages that actually has a proper specification allowing independent implementations, and it is not just saying that “the spec is whatever code we write”.

So these comparisons frankly make no sense as every such shortcoming could have been easily fixed in 20 years.

Re:Functional programming is not popular because it is weird... by coldtea on Wednesday September 15, 2021 @03:52AM (#28536433)
>Well, it’s not hard being faster than 20 years old tech.

Yes, but it was even more hard to make Java applets run with any acceptable speed in 1997, which is what mattered for their deprecation. Understadingly people didn't just say "let's suffer them for 10 years until the hardware catches up to make them tolerable".

>Also, webassembly still doesn’t have proper bindings to the DOM

Yes, but still better than what applets had :-)

>So these comparisons frankly make no sense as every such shortcoming could have been easily fixed in 20 years.

It would make even less sense for people in 1997-1999 to stick with applets because "such shortcomings will be easily fixed in 20 years". People use what works now, or at least offers a serious advantage despite the shortcomings. Java applets then didn't offer much.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @04:12AM (#28536549)
> Understadingly people didn't just say "let's suffer them for 10 years until the hardware catches up to make them tolerable".

It’s funny because that is essentially what happened. Other than flash (which suffered essentially from the same shortcomings as applets, but at least had a productive environment to create them), there was nothing that replaced these technologies for many years to come. Canvas rendering came much later and only with much more recent browsers did it have acceptable performance. It is not accident that many people long for the old web which was strangely more interactive in some cases than what we have today.

Don’t get me wrong, java applets were shitty. But we sort of threw it all away instead of fixing it, which in hindsight seems to have been an easier road (since the JVM has always been the state of the art runtime, and JS engines had to catch up from zero). DOM integration into an object oriented language would have been much easier than what webassembly does through JS bindings, and lack of security was frankly more of a mindset back then, and the jvm could have been sandboxed just as “easily”* as js engines are.

* it is a hard thing to do, but it happened to JS engines because the money was there. Integrating the JVM with proper sandboxing would have required less money/energy.

Re:Functional programming is not popular because it is weird... by 1f60c on Tuesday September 14, 2021 @05:25AM (#28522210)
Correct me if I'm wrong, but I think the problem with applets was that they were too powerful and it took eons for vulnerabilities to be fixed.
Re:Functional programming is not popular because it is weird... by goto11 on Wednesday September 15, 2021 @04:11AM (#28536543)
The problem with Java applets was not the use of bytecode or a VM. The problem was that it was slow to start so you looked at a grey rectangle for a long time before anything happened. Flash was much snappier, which is why it won out over Java. Flash also had better development tools targeted multimedia and games.
Re:Functional programming is not popular because it is weird... by malft on Tuesday September 14, 2021 @08:30AM (#28523722)
Java has all the security logic INSIDE THE VM.

That's the big difference.

Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:26AM (#28522215)
- Now you can go back to run Java applets in a web browser!
Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:28AM (#28524468)
>It is almost forgotten now, but the platform which carried Java to critical mass was the browser

I think that's backwards. I was there. Aside from a few e.g. banking and government applets one was forced to use and a couple of exceptions, applets never got anywhere and died fast.

Enterprise Java became what Java is all about very very soon. Java landed in 1996. Servlets/Tomcat landed in 1998.

By 2000 there was plenty of enterprise Java development - in fact that was the year MS created its own Java copy, in the form of C#/.NET after having tried to extend their version of Java for the Windows platform.

Re:Functional programming is not popular because it is weird... by Izkata on Tuesday September 14, 2021 @10:07AM (#28525037)
Back when Flash was called Shockwave, it was competing with Java applets for browser games. It did lose, but it was out there.
Re:Functional programming is not popular because it is weird... by NoSorryCannot on Tuesday September 14, 2021 @12:45PM (#28527399)
Minor nit, Shockwave wasn't the same as Flash. All three plus ActiveX overlapped in their time on the market, which is hair-raising to think about.
Re:Functional programming is not popular because it is weird... by Izkata on Tuesday September 14, 2021 @12:56PM (#28527544)
Was Shockwave a platform for Flash then, or something?

I don't know any technical details here, but from a user perspective Shockwave did turn into Flash. The Flash file extension "swf" even stands for "ShockWave Flash".

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @02:05PM (#28528450)
It was two separate products with separate origins. Macromedia had Shockwave and then they purchased Flash (which was called Splash then) and branded it Shockwave Flash.

Shockwave was somewhat similar to Flash, but it was developed for the "multimedia" CD-ROM's, which meant the files was generally too big for online. Flash was much more compact which is why it won out.

Re:Functional programming is not popular because it is weird... by native_samples on Wednesday September 15, 2021 @06:48AM (#28537506)
Shockwave = plugin for playing Macromedia Director content. Director was a GUI builder for interactive multimedia apps which were programmed in a custom language called Lingo.

Flash was originally called FutureSplash, if I recall correctly. When Macromedia bought it they rebranded it to fit their general branding theme, hence the confusion. Flash wasn't really intended to be an app platform, it started out as a vector animation format, but later they added scripting using a dialect of JavaScript called ActionScript.

Most users ended up with the Flash plugin but not the Shockwave plugin. Macromedia Director was huge in its day - my first programming job involved writing Lingo - but it died out pretty quick when the internet started taking off.

Re:Functional programming is not popular because it is weird... by CRConrad on Wednesday September 15, 2021 @07:26PM (#28545796)
> Flash was originally called FutureSplash

So had the renaming taken place now in stead of twenty years ago, it would be called F7lash in stead of just Flash.

Re:Functional programming is not popular because it is weird... by detaro on Tuesday September 14, 2021 @12:58PM (#28527573)
Shockwave was Flash's larger brother, feature wise. Shockwave stuff could contain Flash files, but Shockwave could do things Flash couldn't, or could do them earlier. (And if I remember correctly Shockwave came first, and when Macromedia aquired it they then build Flash)
Re:Functional programming is not popular because it is weird... by selfhoster11 on Wednesday September 15, 2021 @04:13AM (#28536561)
Notably, Linux support for Shockwave was missing.
Re:Functional programming is not popular because it is weird... by foota on Tuesday September 14, 2021 @04:03AM (#28521682)
I don't think ML was what it is today when python started.
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:13AM (#28521742)
Right, definitely not.

From my perspective, Python became popular as the simplest and friendliest general scripting language along the lines of Perl or TCL, and the easiest for somebody familiar with other languages like C or Java to pick up.

If I wanted to do something just a bit too fiddly for a shell script, I'd reach for Python (and still do, although I've recently started using Node too).

Perl initially became popular as the best text-wrangling language for CGI scripts and the like, but (I think) was a bit too weird to be a general-purpose hit for the masses like Python. Likewise Tcl/Tk was great for whipping up quick UIs, but both parts seemed a little too weird to stand on their own.

Ruby was another strong contender; I think Python was already too well-established to be displaced by Ruby, but Ruby found its audience via Rails (which I'm guessing is better than Django).

Re:Functional programming is not popular because it is weird... by somejan on Tuesday September 14, 2021 @05:18AM (#28522162)
Rails was the first of that type of web framework. Django and all similar frameworks are Rails clones. At that time Rails was the killer app for Ruby. Unfortunately for Ruby the other languages were willing to put in the effort to copy it, and Rails is no longer a unique advantage.
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @07:42AM (#28523210)
Django and all similar frameworks are Rails clones.

Hmm, are you sure? I’m not saying you’re wrong, because I’m not sure myself! I heard of Django before I ever heard of Rails but that doesn’t mean much.

Wikipedia suggests they were released at around the same time -- Django started slightly earlier, Rails open sourced earlier.

Re:Functional programming is not popular because it is weird... by crucialfelix on Tuesday September 14, 2021 @08:47AM (#28523908)
Zope was the leader in python long before Django or rails. Since 1999

ColdFusion and JSP and PHP were dominant for a long time before Rails as well.

Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @05:40PM (#28531754)
Aha, yes, I was getting mixed up between Zope and Django!
Re:Functional programming is not popular because it is weird... by dragonsh on Tuesday September 14, 2021 @04:10AM (#28521729)
Just a minor nitpick Rust still has miles to go before it catches with Python or Go or Java, so not yet in the same league. Most of the rust crates today depends on C, so it’s not going to replace C in next 2 decades, but will still depend on C.

Hopefully it will start replacing C going forward but in that space Rust is competing with Zig and Nim.

Re:Functional programming is not popular because it is weird... by krageon on Tuesday September 14, 2021 @04:18AM (#28521771)
> Zig and Nim

Two languages almost nobody uses. It doesn't seem likely it's actually competing with them in that case.

Re:Functional programming is not popular because it is weird... by another_story on Tuesday September 14, 2021 @04:37AM (#28521913)
You hardly hear about Zig or Nim. Are they actually being used in production?
Re:Functional programming is not popular because it is weird... by cb321 on Wednesday September 15, 2021 @03:32PM (#28543356)
I do not know about Zig, but Nim is used in production at multiple companies - biotech, cryptocurrencies, finance, had an attempted commercial video game app, etc., etc. See here [1] for example.

[1] https://github.com/nim-lang/Nim/wiki/Organizations-using-Nim

Re:Functional programming is not popular because it is weird... by Zababa on Tuesday September 14, 2021 @09:47AM (#28524729)
Rust isn't competing with Zig and Nim just like C isn't competing with Rust.
Re:Functional programming is not popular because it is weird... by pharmakom on Tuesday September 14, 2021 @04:05AM (#28521695)
> And I have to agree: State management is a huge part of CRUD apps.

I see this point come up often, but it doesn’t really line up with my own experiences. I find the explicit state control in functional languages makes it much easier to write enterprise CRUD.

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @12:38PM (#28527298)
CRUD is about state, but typically the mutable state is in the database, not the application layer.
Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:25AM (#28522207)
UNIX became popular because it was free beer with source tapes.

Had UNIX been written in PL/I, Mesa or BLISS, those languages would be "C" today.

Re:Functional programming is not popular because it is weird... by Stratoscope on Tuesday September 14, 2021 @06:09AM (#28522510)
Oh, how I miss BLISS. It was the first language I learned that got rid of the silly distinction between statements and expressions. What a revelation! Everything was an expression. Everything returned a value. I guess a bit like Ruby, but 40 years ago.

https://en.wikipedia.org/wiki/BLISS

https://www2.cs.arizona.edu/classes/cs520/spring06/bliss.pdf

Re:Functional programming is not popular because it is weird... by CRConrad on Wednesday September 15, 2021 @07:35PM (#28545883)
> Everything returned a value. I guess a bit like Ruby

Like C, isn't it? Assignments return values! Still feels weird AF to those of us who started on BASIC and Pascal.

Re:Functional programming is not popular because it is weird... by fancy_hammer on Tuesday September 14, 2021 @06:46AM (#28522750)
Elixir possibly has some of this flavour. If and switch are both expressions and return values. I dig it.
Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @01:55AM (#28535726)
I think it is that way in almost every FP language (eg. Scala, Haskell, Kotlin, etc)
Re:Functional programming is not popular because it is weird... by krageon on Tuesday September 14, 2021 @04:17AM (#28521769)
> Go did that with it's own properties

Go got popular because it was a Google thing and everyone fanboyed hard over that.

Re:Functional programming is not popular because it is weird... by somejan on Tuesday September 14, 2021 @05:35AM (#28522275)
While Google's support was definitely a factor, Go also had some important language features going for it. Most importantly it is targeting a relatively empty niche in the programming language landscape, i.e. that of high performance, close to the metal languages with little performance overhead, while still being easy to write. "Easy to write" for 80% comes down to being memory-safe, unlike C/C++. If you're in that niche, you have few alternatives. The other options for mainstream memory-safe languages are interpreted scripting languages and Java-style jitted languages. Go easily beats both in resource consumption without being much harder to program in. Rust isn't really comparable because while it is memory-safe its memory management system still forces the programmer to think about the memory and resource usage, thus being slower to program in.
Re:Functional programming is not popular because it is weird... by benibela on Tuesday September 14, 2021 @08:01AM (#28523383)
I have always used Pascal for that

But no one else does

Re:Functional programming is not popular because it is weird... by GuuD on Tuesday September 14, 2021 @08:44AM (#28523874)
Go is just shitty Pascal, change my mind.

On a more serious note. I decided to read Delphi documentation recently because I’m old enough to hear a lot about it, but not quite old enough to write anything in it. It had discriminated unions. It did! I can’t imagine my life without them, I write stuff exclusively in Ocaml-like languages, so the only question that I have in my mind is “how the hell we managed to go backwards?” It’s so weird.

Re:Functional programming is not popular because it is weird... by zeroc8 on Wednesday September 15, 2021 @02:38AM (#28535956)
Go has some restrictions, but all in all it's a great little pragmatic language, which solves a lot of practical problems (utf-8 strings, concurrency, garbage collection, cross compilation, single binary deployment, performance, readability) and which I can easily keep in my head as opposed to most of the other languages I've used in my career.

In that way it's like a Delphi for the modern world.

Re:Functional programming is not popular because it is weird... by CRConrad on Wednesday September 15, 2021 @07:40PM (#28545927)
No, Free Pascal is Delphi for the modern world.
Re:Functional programming is not popular because it is weird... by CRConrad on Wednesday September 15, 2021 @07:38PM (#28545910)
Of course it had. Turbo Pascal had, AFAICR. (Probably because, at a guess, Wirth-standard Pascal did; though I'm less certain about that.)
Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @01:57AM (#28535736)
How is that different from eg. D? Or the myriad other GCd AOT compiled languages?
Re:Functional programming is not popular because it is weird... by t-3 on Tuesday September 14, 2021 @07:56AM (#28523337)
Did google still have fans among the technical crowd when golang launched? I'd expect Rob Pike and Ken Thompson to be the fanboy-attractors rather than google.
Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:20AM (#28521785)
What happened to Dart, then?
Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:29AM (#28522235)
It got betrayed by Google itself when the Chrome team dropped support for DartVM support.

Then AdWords team which had just gone through GWT => Dart rewrite, kind of rescued the project from closing down, after the key designers left.

Finally Flutter team kind of gave a new life to Dart, which made Dart only relevant in the context of Flutter.

Re:Functional programming is not popular because it is weird... by joe_fishfish on Tuesday September 14, 2021 @04:23AM (#28521809)
It targeted the front-end, which lots of programmers don't give a shit about.
Re:Functional programming is not popular because it is weird... by rmbyrro on Tuesday September 14, 2021 @04:15AM (#28521753)
Java and the JVM had considerable marketing investiment to become a popular choice among the enterprise segment.

Python was taught in many universities for its flat learning curve, then started to be used in academic research.

Even without an unrelated platform, like JS and the browser, they had something to catapult their adoption.

Re:Functional programming is not popular because it is weird... by masklinn on Tuesday September 14, 2021 @04:43AM (#28521949)
> Python was taught in many universities for its flat learning curve, then started to be used in academic research.

Python was used in academia long before it was used for teaching. “Courting” scientists was done from extremely early on in the language history (matrix-sig was founded in 1995) and the “extended” indexing added at their request (auto-tupling and slicing predate PEPs as those were introduced for and by Python 2).

Re:Functional programming is not popular because it is weird... by twistedpair on Tuesday September 14, 2021 @07:51AM (#28523289)
The Spark data processing platform was/is popular, and is written in Scala, a.k.a. FP.
Re:Functional programming is not popular because it is weird... by roenxi on Tuesday September 14, 2021 @03:47AM (#28521593)
Java & Go are sponsored by megacorps; their success or otherwise has little to do with the language's strength in isolation. They are more examples in favour of successful platforms being leveraged to promote a language.
Re:Functional programming is not popular because it is weird... by ronenlh on Tuesday September 14, 2021 @04:37AM (#28521914)
> If Netscape had decided to use a Scheme-like language or a BASIC-like language it would still be the most popular language in the world.

Brendan Eich advanced a Scheme-like scripting language for Netscape, which got a facelift from Java’s popularity.

“Scheme was the bait I went for in joining Netscape. Previously, at SGI, Nick Thompson had turned me on to SICP.”

“The diktat from upper engineering management was that the language must “look like Java”.“

“I’m happy that I chose Scheme-ish first-class functions”

JS actually made a few functional concepts mainstream, such as first-class and anonymous functions, and callback patterns.

Source: https://brendaneich.com/page/5/

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.

Re:Functional programming is not popular because it is weird... by _dain_ on Tuesday September 14, 2021 @05:11AM (#28522114)
There is a functional programming language that is coupled to a platform, that most people on HackerNews wouldn't think of: the M language for PowerQuery. It is used to make ETL pipelines for Excel (and I think other Microsoft apps?). It is very popular, although among people who don't consider themselves "programmers" or "software engineers", but rather analysts.

https://docs.microsoft.com/en-us/powerquery-m/

In fact, Excel itself can be considered a functional, reactive programming environment, and if we grant that, then it is the most popular programming language on the planet.

Re:Functional programming is not popular because it is weird... by rkangel on Tuesday September 14, 2021 @06:00AM (#28522447)
It has just occurred to me that Excel is an excellent example of a functional language to use to explain to people who don't understand what functional languages are.
Re:Functional programming is not popular because it is weird... by codetrotter on Tuesday September 14, 2021 @02:57AM (#28521239)
> If Netscape had decided to use a Scheme-like language or a BASIC-like language it would still be the most popular language in the world.

If whatever Netscape added as their scripting language had been too weird I think there is a good chance that a competing browser would’ve implemented a less weird language and that such a less weird language would have won over the hypothetical too weird language.

For me, Objective-C is too weird so I never bothered with it but I love Swift and only after Swift came out did I start making apps for iOS. And that’s even though I had been wanting to make mobile apps for iOS for a long time.

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @03:17AM (#28521384)
Microsoft introduced VBScript support in Internet Explorer. VBScript was a variant of Visual Basic and therefore a lot more familiar than JavaScript. VB was already used in MS Office and a whole generation had learned programming starting with BASIC. But it didn't matter.

Nobody would use a language which wasn't supported by the browser with the largest market share, regardless of the merits of the language.

Re:Functional programming is not popular because it is weird... by jcelerier on Tuesday September 14, 2021 @03:45AM (#28521573)
I disagree, at school we studied both C and LISP during the same semester, writing a lot of similar things in procedural Vs functional styles... I can assure you that most people (who didn't have any programming exposure) really preferred C
Re:Functional programming is not popular because it is weird... by Banana699 on Wednesday September 15, 2021 @10:58AM (#28539976)
This data point is confounded by lisp's weird syntax, I would expect people not used to programming to hate the excessive indentation and nestedness that lisp's syntax does to expressions.
Re:Functional programming is not popular because it is weird... by jcelerier on Wednesday September 15, 2021 @11:16AM (#28540200)
from my memories it was much more the equational thinking required which was a hard conceptual leap. Most people are really not used to it.
Re:Functional programming is not popular because it is weird... by deepstack on Tuesday September 14, 2021 @03:43AM (#28521553)
> JavaScript became popular because of the browser

I would also say it is mainly due to Gmail and their G Maps extensive use of XMLHttpRequest, and Douglas Crockford insight on that JS has closure and function as first class citizen, it is just Scheme is C clothing. Check out his Little Javascripter. That and of course the intro of JSON.

Re:Functional programming is not popular because it is weird... by blacklion on Tuesday September 14, 2021 @08:26AM (#28523674)
> and Douglas Crockford insight on that JS has closure and function as first class citizen

«Insight» is like «RTFM»? :)

Re:Functional programming is not popular because it is weird... by goto11 on Wednesday September 15, 2021 @03:47AM (#28536401)
> and Douglas Crockford insight on that JS has closure and function as first class citizen

That is not an "insight". Anyone who had written an event handler in JavaScript would already know that.

Re:Functional programming is not popular because it is weird... by _the_inflator on Tuesday September 14, 2021 @05:39AM (#28522301)
I think that we must see C always in the context of assembly language. Pascal and C really helped things moving forward in terms of abstractions. C seems hard now and it is, however, assembler is way harder and when things started to evolve from 8bit to 16 and 32bit computers, we were all glad that machine language was something from the past. Same goes in most part to BASIC.
Re:Functional programming is not popular because it is weird... by blablabla123 on Tuesday September 14, 2021 @08:17AM (#28523556)
Not sure if it's implied but JavaScript was basically ideated as Scheme with C syntax in the Browser. That concept didn't take off for quite some time but pure functional programming within React actual got quite some popularity. Even "plain React" is borrowing a lot of concepts from FP, especially when combined with Flux and other add-ons. During that time also Clojure due to Om (React with Clojure) gained some popularity.

One language where FP basically arrived in the mainstream is by the way Scala. And there are other newer language which allow for FP'ish programming like Kotlin.

But otherwise it's true, languages like Schema or Haskell will probably not arrive in the mainstream soon.

Re:Functional programming is not popular because it is weird... by coldtea on Tuesday September 14, 2021 @09:18AM (#28524325)
>Languages do not becomes successful due to their intrinsic qualities. Languages become successful when they are coupled to a successful platform.

That's true for system and low-level application languages (Javascript is an exception, as for the web platform, there's no alternative so it's used for everything).

Perl, Python, Java didn't become succesful because of platform ties (yes, Java was made by a platform vendor, but most of its programmers used Windows and deployed on Linux or AIX, not Solaris).

Re:Functional programming is not popular because it is weird... by malkosta on Wednesday September 15, 2021 @02:55PM (#28542901)
> Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language.

WhatsApp backend is written in Erlang. A large part of the world's telecom infra is written in Erlang (2G, 3G, 4G, 5G). It powers the highest availability systems in the world. Still nobody cares about it....

Re:Functional programming is not popular because it is weird... by austincheney on Tuesday September 14, 2021 @03:56AM (#28521646)
> JavaScript became popular because of the browser

That is a very popular perspective. In the past I have seen this sentiment used heavily by people who hate JavaScript as a means to rationalize how JavaScript could have become popular at all.

Unfortunately this sentiment is disqualified by data.

The browser became a popular platform in the late 90s and early 2000s as business and social interest on the web grew. JavaScript has been around cross-platform in a mostly consistent way since 1998 due to the publication of early current standards.

This did not make JavaScript popular though. JavaScript would not become popular for more than a decade later.

In 2008 a couple of things happened. Chrome launched offering the first JavaScript JIT. Before this JavaScript was hundreds of times slower than it is now. Also, jQuery started gaining popularity at this time which allowed employers to hire any dumbass off the street to write in it. Douglas Crockford also heavily evangelized the language for its expensive capabilities: functions as first class citizens, optional OOP (easily ignored/bypassed), native lexical scope.

A little after that around 2009/2010 Node.js launched and GitHub became common knowledge. It’s about this time that JavaScript exploded in popularity. The web was already popular for more than a decade before this.

> Functional programming is less popular because no major successful platform has adopted a functional language as the preferred language.

I would argue functional programming is incredibly popular but less common in the workplace because OOP conventions are what’s taught at school.

Re:Functional programming is not popular because it is weird... by juki on Tuesday September 14, 2021 @04:44AM (#28521961)
> Unfortunately this sentiment is disqualified by data.

Your comment seems to support, rather than disprove, the claim.

JS was around for years without much success before the browser became a popular platform for applications. People used to only write applications for the server or for platforms like Java and Flash that were just embedded as plugins in the browser. They only started using JS after improvements to browsers made it a better platform than the alternatives.

Re:Functional programming is not popular because it is weird... by zone411 on Tuesday September 14, 2021 @04:21AM (#28521792)
This shows JavaScript as being popular since at least 2004 (beginning of the dataset) https://trends.google.com/trends/explore?date=all&q=javascri... and this is closer to my recollection.
Re:Functional programming is not popular because it is weird... by kryptiskt on Tuesday September 14, 2021 @06:09AM (#28522508)
Javascript became mainstream with the Web 2.0/AJAX hype of 2004. It was still Google's "fault", but it was the slick Google Maps site (and also GMail) and not Chrome that was the inciting factor. With an assist from Microsoft's Web Outlook and XMLHttpRequest.

Really, the reason Chrome invested heavily in optimizing Javascript was because it had started to be widely used in more than trivial scripts.

Re:Functional programming is not popular because it is weird... by antris on Tuesday September 14, 2021 @04:09AM (#28521715)
> I would argue functional programming is incredibly popular but less common in the workplace

It would help if someone defined what constitutes "using functional programming".

I mean, this is functional programming:

   function add(a, b) { return a + b }
From my experience, every developer does functional programming to a certain extent, it's just the extent that varies.
Re:Functional programming is not popular because it is weird... by hasmanean on Tuesday September 14, 2021 @06:31AM (#28522657)
Functions were invented by functional languages…but they originally were a lot more flexible than the way most procedural languages use them now.

Let’s try rewriting your example this way

add = function(a,b) { + a b }

Why is this better? Because + is a function, and add is an object, so you can then refactor the code to say this

add = +

Try doing that in C.

As I see it the code for some programs has a high degree of symmetry (ie repeated patterns), and the best language is a notation the let’s you capture that the best.

If you find yourself cutting, pasting and modifying things slightly each time, then your language is holding you back.

Test-script code is the best example of this…particularly hardware tests. You have the same code copied and pasted dozens of hundreds of times.

Thoreau once said that government is best that governs least. That language is best that makes you type the least.

Re:Functional programming is not popular because it is weird... by kaba0 on Wednesday September 15, 2021 @02:18AM (#28535831)
> add = + > Try doing that in C.

Function pointers. They are abused to no avail in C programs. It has the original callback hell, not JS. (And that is mainly because C has no proper way for abstractions)

Re:Functional programming is not popular because it is weird... by iainmerrick on Tuesday September 14, 2021 @04:40AM (#28521935)
Yes, that's functional programming! I think you're right to say that many programmers use FP much of the time. The modern trend is definitely to borrow many FP techniques and use them inside an imperative shell.

Your example is strict FP, where a and b are fully evaluated before add() executes. There's also non-strict FP, where everything uses lazy evaluation by default. That has some big advantages but also a few pitfalls, and generally makes things significantly weirder when compared to imperative languages.

Pure FP is where you only have functions and expressions, no variables at all. I think that's where most mainstream programmers draw the line -- sometimes you just want to store something somewhere, without being forced to jump through what seem like weird hoops.

The original elevator pitch for Haskell was that it's a "non-strict, purely functional" language (aimed a unifying a bunch of different research languages, plus the proprietary language Miranda).

Re:Functional programming is not popular because it is weird... by erostrate on Tuesday September 14, 2021 @02:55AM (#28521222)
How does your theory explain Rust or Python?
Re:Functional programming is not popular because it is weird... by valenterry on Tuesday September 14, 2021 @03:12AM (#28521331)
Despite Rust being around for quite some time now, highly liked (hyped) by its users and being a good language with many features that make it stand apart while having major commercial support, it's still a very niche language.

I think it rather supports the OPs claim.

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @03:23AM (#28521429)
People are learning Python because they want to do ML or scientific computing - not the other way around. Python has its current popularity because of NumPy and the whole numeric and ML ecosystem.

I love Python as a language, but realistically it could just as well have been Ruby or some other language.

Re:Functional programming is not popular because it is weird... by arc-in-space on Tuesday September 14, 2021 @04:19AM (#28521775)
Python was already quite popular by the time 3.0 came out in 2008, well before the AI summer was in full swing, which is a large part of what drove the popularity of NumPy et al.

You're not wrong now, but that's just the chicken, the egg included web applications and its use as a scripting language.

Re:Functional programming is not popular because it is weird... by pjmlp on Tuesday September 14, 2021 @05:32AM (#28522254)
Python was already the scripting language of choice at CERN when I was there about 20 years ago.

Summer School computing classes even used to teach unit testing in Python.

And the Atlas HLT/DAQ build scripts were based on Python.

Re:Functional programming is not popular because it is weird... by beowulfey on Tuesday September 14, 2021 @06:33AM (#28522664)
The counter example you’d probably want to use is Julia — it was written with scientific computing in mind, but is nowhere near as popular.
Re:Functional programming is not popular because it is weird... by twistedpair on Tuesday September 14, 2021 @11:20AM (#28526182)
Seems that NumPy was written in Python b/c the ML community was using Python, not the other way around.
Re:Functional programming is not popular because it is weird... by tgv on Tuesday September 14, 2021 @02:57AM (#28521241)
For Python, the platform is education.
Re:Functional programming is not popular because it is weird... by Jensson on Tuesday September 14, 2021 @03:05AM (#28521290)
And most educators decided on Python because? You don't think it has anything to do with people liking the language and therefore wanting to use it and teach in it?
Re:Functional programming is not popular because it is weird... by WastingMyTime89 on Tuesday September 14, 2021 @04:41AM (#28521938)
> And most educators decided on Python because?

Because there was a huge push by the Python designers towards this direction?

They got funds from the DARPA in 1999 for a proposal entitled "Computer Programming for Everybody", the first part of which was " Develop a new computing curriculum suitable for high school and college students".

The Python project did a lot of outreach and marketing specifically targeted at educators to explain why Python was a great teaching language (and did a lot of work to make it so - don't get me wrong). It worked.

Re:Functional programming is not popular because it is weird... by dijksterhuis on Tuesday September 14, 2021 @03:21AM (#28521415)
It can also be due to tooling -- once a student has got the python binary installed you can get them writing and running code without having to make sure they have the correct version of x, y, z (don't even need conda or pip) or teaching them what a compiler is etc.

Javascript is quite popular as an introductory language too -- students can open up a web browser and type stuff in the console in the middle of a lecture.

Re:Functional programming is not popular because it is weird... by Qem on Wednesday September 15, 2021 @10:02AM (#28539147)
I agree. It even features a basic IDE, IDLE, as part of the default install. No need to figure out how to configure your text editor to interact with the Python shell. I remember trying to learn Ruby before Python, several years ago, but then got stuck trying to configure Geany to work with Ruby.
Re:Functional programming is not popular because it is weird... by Zinu on Tuesday September 14, 2021 @03:23AM (#28521426)
They chose Python since it's essentially a free, open-source alternative to Matlab.

Also, Python is used as a scripting language on top of C, and C is popular.

Re:Functional programming is not popular because it is weird... by jasode on Tuesday September 14, 2021 @04:50AM (#28521996)
>They chose Python since it's essentially a free, open-source alternative to Matlab.

Different domains of education had different reasons but some classes had nothing to do with Matlab.

- The professor Gerry Sussman of the famous MIT 6.001 SICP class said they switched from Scheme to Python because (paraphrasing) it's more high-level with libraries to get immediate work done. (E.g. A class project to control a robot.)

- Peter Norvig teaching Artificial Intelligence classes switched from Lisp to Python because he noticed his students kept getting stuck on Lisp syntax instead of progressing on the more important AI concepts. Switching to Python made teaching the class easier.

One can google for their interviews on why they switched to Python.

Re:Functional programming is not popular because it is weird... by Jensson on Tuesday September 14, 2021 @03:29AM (#28521468)
Why didn't they use Scheme? That was pushed by a very prestigious institution so had some momentum in the education field. Instead they switched to Python and basically nobody uses Scheme to teach any longer. Python won because people preferred it over lisp, simple as that.
Re:Functional programming is not popular because it is weird... by detaro on Tuesday September 14, 2021 @04:43AM (#28521952)
Teaching Scheme etc always got pushback from the outside, because regardless of how well it works for education, people get it in their head that you are teaching something that "industry doesn't use" and thus is bad.
Re:Functional programming is not popular because it is weird... by detaro on Tuesday September 14, 2021 @04:42AM (#28521945)
in comparatively few places Matlab would have been the alternative.
Re:Functional programming is not popular because it is weird... by Peritract on Tuesday September 14, 2021 @08:03AM (#28523403)
It's a really intuitive one for new people to learn - you're far from the machine, but the syntax doesn't get in the way of the concepts much. Of all the languages I have taught people in, Python is the quickest route to understanding/independence.
Re:Functional programming is not popular because it is weird... by jfcisco on Tuesday September 14, 2021 @03:03AM (#28521278)
It also helps that Linux distros usually come with Python
Re:Functional programming is not popular because it is weird... by dijksterhuis on Tuesday September 14, 2021 @03:07AM (#28521300)
Python is quite popular with the data / machine learning crowd. Think pandas, tensorflow etc.
Re:Functional programming is not popular because it is weird... by Jensson on Tuesday September 14, 2021 @03:22AM (#28521422)
Python was popular before those libraries came out though. And then people wrote those libraries in Python because it was popular, making it more popular. People using popular languages to create platforms or on their platforms isn't evidence that having a platform is what drives language popularity.
Re:Functional programming is not popular because it is weird... by js8 on Tuesday September 14, 2021 @03:39AM (#28521535)
Python came with a platform of sorts, its motto was "batteries included", after all.
Re:Functional programming is not popular because it is weird... by 57844743385 on Tuesday September 14, 2021 @05:09AM (#28522101)
I personally find functional languages highly unintuitive.
Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @05:48AM (#28522359)
Intuitive just mean familiar. A programming language is intuitive if it is similar to another language you are already familiar with.
Re:Functional programming is not popular because it is weird... by menotyou on Tuesday September 14, 2021 @07:33AM (#28523131)
I personally find object oriented languages highly unintuitive.
Re:Functional programming is not popular because it is weird... by CRConrad on Saturday September 18, 2021 @04:00PM (#28578814)
12: GOTO 11

REM That is, "goto11"'s sibling comment https://news.ycombinator.com/item?id=28522359

Re:Functional programming is not popular because it is weird... by amelius on Tuesday September 14, 2021 @05:49AM (#28522370)
This is exactly the reason why people are trying to push their favorite language down everyone's throat.
Re:Functional programming is not popular because it is weird... by dna_polymerase on Tuesday September 14, 2021 @05:50AM (#28522379)
Hi, do you have a minute to talk about our lord and saviour, Rust?
Re:Functional programming is not popular because it is weird... by tdy_err on Wednesday September 15, 2021 @03:28AM (#28536272)
Chicken or egg?
Re:Functional programming is not popular because it is weird... by patrick451 on Tuesday September 14, 2021 @02:55AM (#28521227)
Why do you assume the browser would have become as popular as it did if Netscape had gone with Scheme? Or Unix with C?

It seems more likely there is a feedback between the popularity of a platform and it's anointed language.

Re:Functional programming is not popular because it is weird... by goto11 on Tuesday September 14, 2021 @03:11AM (#28521330)
Netscape already had total dominance of the browser market when JavaScript was introduced.