Hacker News new | ask | show | jobs
by named-user 1691 days ago
I think it's generational.

I believe we are limited by our own experience, a lot of software is built upon the idea that problems are solved through procedural steps rather than a series of transformations.

This does not lend itself to thinking in a way that aligns nicely with functional programming.

Future generations will naturally think in ways unfathomable to you and I, and this will cause a shift in the fundamental approaches to software development.

2 comments

I think it’s subjective. I learned Haskell early on in university and I’ve learned Lisps and it still feels like extra work to reason about programs or model domains in functional languages.

I believe functional programming advocates when you guys say it works better. But I only believe it works better for you. In my experience there’s a minority of people who find functional programming to be a powerful paradigm shift but for most developers functional programming either doesn’t resonate or resonates at the level of an academic exercise that helps you think better about writing code but best remains an academic exercise.

It can be extra work to reason about the performance and efficiency of functional programs, such is the case with higher level languages. But modelling the domain is far easier. I can solve difficult problems using Haskell, e.g. writing a specialist DSL compiler targeting a GPU. I'm just not smart or patient enough to solve such problems in C/C++ or Java, although I do concede that many can.
I did the same path as you.

I think that the procedural programming is much more common because of the academic and work experience of many programmers. Functional programming is a transition of the way of thinking that seems not worth it. But after I got my hands dirty, I found myself writing much more clean and consistent code in every language. I enjoyed particularly Clojure because has a good ecosystem and tools, and also take some design decisions to steer you for a more robust code. https://clojure.org/about/functional_programming#_immutable_...

I broadly agree. I actually think most people are most at home in the procedural domain, and most just write procedural code in OOP languages. Which is hard to do in an FP.
Erlang is often described as having an imperative core. It was my gateway drug for FP, I certainly found it much easier to grasp and write than any Lisp.
As did I. I went imperative languages -> Haskell (wtf) -> Clojure (wtf) -> Erlang (love it) -> Clojure (love it) -> Elixir (love it).

My two favorite languages these days are Clojure and Elixir. Currently mostly Clojure because my main side project is more amenable to Clojure's methods of concurrency than Elixir.

Last time I checked, everything is still running on von Neumann/Harvard CPUs. Did I miss a major revolution in computing?
Forgive the tangent, but your comment reminded me of item #52 on the venerable "Things to say when you're losing a technical argument" list. :)

http://web.archive.org/web/20050131033632/http://www.skirsch...

Yikes.
Yes, nowadays we have those machines, called computers (or automatic computers if you need the older name for reference), that can take software made for one architecture, no matter how unreal, and turn it into software made for another architecture.
Could you share a Haskell compiler that produces output that can execute on a real non-von Neumann/Harvard architecture?
Why would anyone have built one of those, if non-von Neumann architectures are so rare? Compilers aren't much of a weekend project. I don't get your point.
Yes
Please elaborate.
Compilers.
Which (Haskell) compilers that target actually-existing hardware do not output procedural bytecode?
That is the point.