News for hackers. Stuff that matters.
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.