(map #(discard %) opinions)

Supplementing the Disco Cowboy

I guess if I'm going to try and blog regularly, I have to leap on anything that remotely inspires me to write an essay. Today it's a Cameo paid for by my friend Aaron from the Disco Cowboy.

"What are your thoughts on the functional programming paradigm replacing more tradtional program design techniques, such as the object-oriented model? Is the future of computing bright, or will JavaScript interpreters continue to reign supreme?"

To which the DC responded with:

"That's a strong question. I don't know. You asking me? You barkin up the wrong tree!"

dances spasmatically

"My biggest question is: what about Daddy Cool!?"

It's a decent segue into my philosophy on programming and the industry in general, so let's break it down.

Will FP ever replace OOP?

Short answer: no, not really.

Listen, I like Functional Programming a lot. I've literally bet my life savings, my whole career, and several of my friends' careers on FP. I don't claim to be the most academic or pure of the FP crowd, but I've at least attempted to put my money where my mouth has been for a long time, and I've learned a lot by trying (and sometimes succeeding!) at using this paradigm in production.

Over the past decade, we have seen a major shift in-industry away from OOP:

However, I think this does not represent a fundamental shift towards FP. What it does represent, in my mind, is actually a move towards more declarative languages. We're using a million paths to get there, whether it be by moving back towards more a more imperative style, or by adopting little bits and pieces of FP theory, and the reason we want to get there is so everybody starts writing shorter and more correct code.

That's the prime goal of the industry, at the end of the day. Programming is no longer an industry that only a handful of academically-battered MIT super-nerds can participate in--it's a worldwide, cross-cultural, all-ages-welcome trade by now. I believe that in pursuit of making programming easier and more correct for everybody who does it, we do have to try and push the needle towards declarativity--and probably means pillaging the FP school for some implementation ideas.

So, no, OO isn't going away entirely, it's just being re-examined right now. If we can find a way to make it compatible with the goal of making short, correct, declarative programs, then I'm sure it will stay on the scene for years to come, continuously mixed with new FP ideas as all the new languages are, now.

Because--let's be honest, here--FP, wholesale, is probably too hard for the mainstream to adopt.

Is the future of computing bright?

Yes. We've made some missteps, but there's never been a more bright or promising time to get into computers and technology.

Will JS Interpreters continue to reign supreme?

If by "JS Interpreters" you mean "Web Browsers" then... yes. Obviously yes. The web isn't a perfect platform, but it does solve the distribution problem so well that it practically makes up for all of its flaws. In fact, web application programming is arguably what gave us our cool languages back--in the 1990s/2000s, your only options were languages and tools that could directly interface with a given operating system's GUI library, churning out a generation of disgruntled ObjC, C#, and Visual Basic programmers that were held hostage by their host platform.

Nowadays, all you need is a language that can speak HTTP (literally all of them). If you can write your application as a server-side render, you don't even need JavaScript--you can just code away in your favorite language and spit back HTML. If you need a little bit more interactivity, you could bump yourself to the exciting new HTMX project.

Suppose you get to the point where your web application needs heavy interactivity. There are a wide variety of frameworks that allow you to write code the way you want, at the level of hand-holding you need. Yes, you must ultimately target JavaScript, but all is not lost:

Now, if by "JS Interpreters", you mean Node, Deno, and now Bun, then I'll say I'm somewhat hopeful. If you've actually used any of these interpreters, you know that each of them provide such a bevy of features and additional libraries that they only really resemble browser JS at the syntactical level.

In theory, I don't really have a problem with this--it's kinda cool that we have a way for new developers to learn one language (JavaScript) and be able to write code for both frontends and backends at the same time. I don't think it's a coincidence that most developers "graduate" from JS-on-the-backend at some point, instead opting for tools more appropriate for the job, but I don't think it's the worst language you can use server-side (that little award easily goes to C++).

Deno and Bun in particular are very promising, if so because they seem to have accepted Node's de-facto status as a project management tool as much as it is a runtime, and are actually building features around making backend code easier, more performant, and more fun to write.

So, if you want, you can feel doomsday about "JS Interpreters reigning supreme", to which I'll have to ask: was the alternative (platform-language-only application code) that much better? And if you think the current state of JavaScript is that bad... well, at this point, it just sounds to me like you haven't found the JS tooling that's right for you, yet.

What about Daddy Cool?

On this topic, I will concede that the Disco Cowboy probably knows more than I do.

But I sure do love the outfits.

https://www.youtube.com/watch?v=FYGTT7YhywA