137 points · by signa11 · 3y ago · 234 comments
Now that (nearly) every mainstream language has lambda expressions, there are very few patterns in functional programming that cannot be replicated in mainstream languages, which means that moving to a pure functional language now provides strictly fewer choices when problem solving. In order for a programmer to accept a language with strictly less expressive power, those new restrictions must solve problems that the programmer actually cares about.
Rust reached adoption because mainstream systems programmers recognized that memory errors are a huge problem and dealing with the borrow checker is worth it to solve them. Static typing reached mainstream adoption because it made coordinating work in a large team dramatically easier and solved refactoring.
Functional-style programming has hit the mainstream—embedded within imperative and OO code—but purely functional languages have yet to make a good case for their additional restrictions, and I'm not convinced that multiprocessing is that case. Golang mainstreamed a very effective model for multiprocessing in an imperative environment that solves most of the problems without asking programmers to completely change the way they write code, and that model is increasingly being adopted in other languages (Java's project loom, for example).
I don't think this is true. Algebraic data types and exhaustive pattern matching, which implies a type system, are the things I use most in my adventures in functional programming. Mainstream languages (for some definition of mainstream) don't yet have these features.
The original post doesn't mention pure FP. I don't think purity is that interesting when you can have a type system that can reason about mutation (i.e. linear or affine types, similar to Rust.)
What portion of this is due to the fact that you're using a functional pattern on an imperative language? For example, none of those attempts can take advantage of any underlying purely functional data structures (see: Erlang/OTP/Elixir, or Clojure)
Go with a generator, and watch that list be more kind to the resources.
EDIT: In fact, both languages are now listed as having ADTs on the Wikipedia page: https://en.m.wikipedia.org/wiki/Algebraic_data_type
Also, TypeScript's union types can express ADTs, and Rust's enums. I don't think it will be very long before the rest of the mainstream languages catch up.
IMO, people come to Rust because of memory safety, but they stay because of ADT's and similar features.
Haskell doesn't have exhaustive pattern matching it just gives you a warning.
It can have exhaustive pattern matching if you use `-Werror`.
That's frequently the default in an industrial Haskell setting.
I wish that non-exhaustive patterns would be an error by default though.
Sort of hard to reconcile this view with just how much more expressive the Haskells and Lisps of the world are compared to Go and Python! I've used all of these extensively and functional languages have consistently let me define more general and flexible abstractions, do a better job of reflecting my conceptual model of the domain in my code... all in substantially less code and less boilerplate (excessive imports aside :P) than primarily imperative languages.
Functional languages don't stop you from writing imperative code, they allow you to write code that isn't—and, either way, that's just one small aspect of what makes a language adaptable and flexible.
Functional languages are definitely about removing things or stopping things. Nothing stops you from naming a new variable everytime in C, but Erlang stops me from mutating variables. Only stack depth/lack of tail call optimizations stops me from using recursion to loop in C, but Erlang can only loop through recursion.
And Erlang is pretty pragmatic; some other functional languages are a lot more opinionated.
As for Haskell, I guess that gets into the question of how you define expressivity, which is admittedly a very fuzzy term. Here I meant it to mean capable of fluently expressing many different kinds of algorithms without having to resort to circumlocution.
Functional programming is natively supported in almost all modern languages. You call a function which calls a function which calls a function which calls a function, return the result. There's no syntactic sugar, just function calls.
In Haskell, while I've seen people argue that do notation may as well be imperative code, it isn't. It's an approximation of imperative code using Church—Turing and a liberal dose of syntactic sugar, and using it effectively still requires you to understand the underlying monadic model.
In the modern history-rewritten sense of the term to mean Haskell and purity.
In the past LISP was the 100% canonical idea of what a functional language is, including on HN before 2010 or so.
For instance implementations of monadic control flow, effect systems, higher kinded types, algebraic data types, exhaustive pattern matching etc are all laughably unergonomic or entireley missing in most "popular"/"enterprise" languages. Just having a labmda doesn't FP make.
To me, FP in modern functional languages provides abstractions that enable much more straightforward problem solving and understandable code with fearless refactoring. Haskell and Ocaml are the pragmatic leaders here I think, with honorable mentions for things like Scala3, F#, and (kindof?) clojure.
(edit spelling)
I can't say i've ever read the opinion that LISP's syntax allows more expressive programming; rather LISP itself allows more expressive programming at the tradeoff of the syntax.
If you're code is going to be 90% imperative, don't write it in Haskell. If it's going to be 90% functional, don't write it in C++.
The whole point of a programming language is to provide you with common patterns/designs to simplify reasoning about your program. Even base concepts like a "function" or "struct" is really a limitation on the underlying expressive power.
Immutability/purity does solve real problems for programmers: it means that you only have to reason about mutability at the margins of your application. I think people who don't have experience with functional style don't realise how helpful this is. I choose to use functional languages because it makes me a better developer - I am able to write code that I am not diligent/smart/disciplined enough to write in an imperative style.
However, there are times where impurity and mutability are beneficial—whether within a single function or at the margins. Functional programming languages do not tend to have good support for these cases, because their whole thing is representing everything in a functional style.
I think this is why functional languages don't tend to get traction while the multi-paradigm languages do. Given a choice between purity and pragmatism, most engineers will pick pragmatism. The alternative is to intentionally remove tools from your toolbox, and unless those tools are demonstrably more dangerous than they are helpful that's a tough sell.
My ideal language is a multi paradigm language which has robust, statically analyzable support for objects, imperative code, and functional code.
Well, it's obvious to the working corporate-employed programmer, not so obvious to the ivory-tower theorist.
The short argument is that the entire point of a program is to take inputs and produce outputs. Making the consumption of inputs and the generation of outputs a second-class citizen in the language with the goal of "purity" just makes it that much harder for a program to perform its primary task.
Functional programming threads state throughout the execution of the program instead of just putting the state into variables you now have to track what data gets passed where.
1) Referential Transparency - Basically, you can take an expression in your program, and replace it with the result of that expression. and your program will run
the same, every time.
2) Immutability - the idea that data cannot be deleted or changed.
Having a language/runtime that truly embodies these two principles completely eliminates entire classes of problems in regards to parallelism and concurrency.Some languages and their implementations are very ergonomic to programming in a FP style, some are not. ( Im looking at every imperative lang that has lambda semantics and now says they are FP. )
I think people get hemmed up talking about what FP is. There's nothing in there, though about Category Theory, Algebraic Data Types, Static or Dynamic Typing Disciplines, etc.
You've defined purely functional programming, which seems to be the increasingly common meaning of FP. The original definitions only explicitly refer to constructing programs by combining functions:
A History of Lisp http://jmc.stanford.edu/articles/lisp/lisp.pdf
> LISP is characterized by [...] composition of functions as a tool for forming more complex functions.
Can programming be liberated from the von Neumann style? https://dl.acm.org/doi/pdf/10.1145/359576.359579
> informal description of a class of simple applicative programming systems called functional programming (FP) systems, in which "programs" are simply functions without variables.
However, Backus defines his functional programming system mathematically, which could reasonably be construed as referentially transparent.
It's heavily implied that FP is programming with things that resemble mathematical objects and have the above properties, not merely just programming with "functions" so to speak.
https://youtu.be/1_Eg8KYq2iQ?t=1230 <- Great talk on what FP programming style is.
Those patterns in functional programming compose cleanly. They do not compose cleanly once you introduce imperative constructs, which is what you get if all you've done is important lambdas to your OO language, so you've presented a bit of a false choice. All you have is some surface semantics of FP but none of the deep reuse and top to bottom clean, understandable semantics.
We have a difference in what we consider expressive. How in this more expressive language would you represent pure functions or deeply immutable datastructures if it only offered flexible/mutable ones? More flexible does not mean more expressive.
If by expressive you mean conciseness, "Comparing the Same Project in Rust, Haskell, C++, Python, Scala and OCaml"[0] is of interest.
With a function that doesn't cause any mutations and a set of classes/interfaces that offer no mutator methods.
My point is that you don't need to be able to have the compiler enforce constraints in order to express an algorithm—you just write the code. Having the compiler enforce constraints is often helpful but comes with decreased ability to express other types of algorithms that rely on breaking those constraints, so the language as a whole is less expressive. In order for a programmer to accept those limitations there need to be clear advantages, and the advantages that functional programming proponents have put forward so far haven't been persuasive to most developers.
By the definition I'm working with, the most expressive languages are the ones that offer the fewest constraints to what the code can do—LISP would be a top contender. Expressivity isn't the highest virtue, but it is valuable and programmers don't give it up unless they can be persuaded it will be worth it.
Expressing such constraints and having the language/compiler enforce them is part of what I want from an expressive language. That way once I've expressed them, I don't have to ensure those things repeatedly for the entire lifecycle of the program. We each have our definitions and values.
int add(int a, int b) {
return a + b;
}It's exceedingly difficult to find a pure functional example that operates on tangible domain-specific data of objects full of state.
The restrictions that are in FP are there because it comes from the standpoint that equality should be easy.
In a parallel paradigm, state is hard, period. You look at how people use Spark, for example, and it's kind of funny that they are effectively doing FP using an imperative language.
If you view programming as trying to avoid writing the "wrong" program from the state space of all programs, this is a good thing.
I guess it's a matter of priorities/viewpoints: whether your goal is to make writing the correct program easier, or make writing incorrect programs harder.
Beyond that, nothing about Project Loom fundamentally changes the design of all but the most performance sensitive concurrent programs in Java.
For most of us plain programmers that Go was targeted at anyways, a bucket of OS threads is just fine. Now they will be a bucket of virtual threads, which will be nicer, but not exactly game changing.
What it does better than Loom is that all system APIs are savvy about goroutine yielding
Well, off the top of my head, the only language that can do something like Phoenix Framework's "LiveView" is... Elixir (and by association, Erlang/OTP underneath), and... that's it, to my knowledge, because of these reasons: https://news.ycombinator.com/item?id=35026508
> (...)
> If that were true, you'd expect that the many existing functional programming languages would have already satisfied this need. But in my opinion, they haven't
Well there is https://futhark-lang.org/ - it runs on the GPU, and is awesome.
On the CPU side, I think that Rust plus https://github.com/rayon-rs/rayon was a huge breakthrough on writing parallel programs using both functional and imperative programming, and future languages should learn from its successes. The ownership system & the borrow checker, plus other type-level features like the Send and Sync traits, were essential to enable sharing read-only data between threads without synchronization, or sharing read-write data with synchronization, all checked at compile time for data races (which is a huge problem to solve, and is something that neither Go nor Java protects against at compile time)
Indeed Futhark shares a key feature with Rust: it uses uniqueness types to enable in-place updates, which is kind like a limited form of Rust ownership: if you are the sole user of some memory, you can update it and other code will be none the wiser. This kind of thing is very important to build functional programs that are performant in practice.
It may be better to see rust as sitting between functional and imperative paradigms
Sure, there are situations where I've been grateful for the ability to use Python (because everything is so easy), or Perl (because sometimes its the right tool for the job) or Lisp (because its slippery fluidity just feels right) rather than the C/C++ that I've generally used during that time.
But the hard problems I've faced writing code would (almost?) never be made easier by using functional programming, or Rust, or Go or Swift or Brainfuck. The problems are hard because the problems are hard, and typically for me over the last 23+ years, it has been the combination of generically tough programming problems with performance requirements that ultimately make the choice of language mostly irrelevant.
Sure, someone could offer me a thread-safe sparse integer-to-integer mapping container in another language, but then I have to wonder about what design assumptions were made and how performant it is, and if the language was clearly created to prevent me from ever doing such things myself, then I'm going to be deeply suspicious from the outset that it could possibly have my (coding) interests at heart.
I understand that I'm not the typical programmer these days, and I don't work on entirely typical problems, but I can't help but feel that sometimes the focus on "languages to help programmers" comes from programmers who just don't enjoy their work enough and/or don't have enough to do.
The hardest problem is usually something else, but IME some languages make it much easier to solve a given hard problem than others. Some languages are qualitatively safer. Some languages are much more expressive, in the sense that I can implement my solution with far less code/time/cost without compromising anywhere else.
There is a difference between whether I can solve a problem and how efficiently and pleasantly I can solve a problem. I find choice of language rarely affects the former but often profoundly affects the latter.
The language can cause hard problems by itself. Arguably dynamic typing has been partly responsible for driving microservices beyond what's reasonable and thus introduced accidental complexity, largely because they don't have a typing discipline that enforces proper module boundaries.
That's the most obvious example to me, but far from the only one.
Some problems require paradigms to solve, and developing bespoke implementations makes maintenance extremely painful.
We don't need more programming languages. All languages are either hated or not used. The language isn't the problem and it a poor craftsman that always blames the tool.
I've never been on a retrospective of a failed project and the reason being the language.
I would respectfully submit that this is exactly where functional programming shines.
He's doing real-time audio processing. So, first, he's got performance issues. In that environment, it can be very helpful to re-use a buffer without having to allocate one (and without a garbage collector). For most functional languages, that's not a place where they shine.
But, second, he's (probably) got problems like building echo cancellers. The hard problem is, how do you determine whether something is an echo? Writing it in an FP language doesn't help much with that, because the hard part is the definition (and tuning) of the algorithm, not the implementation.
FFTW, long the fastest FFT software available, is a program written in OCaml that generates C. You need to think more outside the box!
Another example: Copilot is a Haskell EDSL that generates a hard real-time C program for avionics.
You can write programs functionally and get your imperative performance too.
It can be via streaming. The functional portion of the program does all the map and reduce operations on streams. Buffer allocation (and reuse) is automatically handled by the compiler. It's very similar to the way NodeJS hides the event loop. I'm not familiar with audio stuff but I'm sure there's libraries out there that allow you to do extremely efficient audio processing with high level language primitives.
>But, second, he's (probably) got problems like building echo cancellers. The hard problem is, how do you determine whether something is an echo? Writing it in an FP language doesn't help much with that, because the hard part is the definition (and tuning) of the algorithm, not the implementation.
Neural networks can be employed here to "recognize" echos. NNs are basically functional primitives with deterministic inputs and outputs. FP is remarkably appropriate here given that audio is basically a function.
I guess I get it though, designing your own language is great fun and I’ve definitely made a couple myself in my spare time.
Indeed. There's a subset of programmers who like to solve "problems" and there's another subset of programmers who like to actualize their intent with minimal exposure to problems.
The later subset is the overwhelming majority both for what programmers themselves want and for what users want out of their programs. Solving "hard" problems is simply a niche desire.
"We don't do hard things because we like doing hard things; we do hard things because we thought they would be easy"
Certainly I naively believed that writing a digital audio workstation would be relatively easy. That was 23 years ago and I'm still writing it.
I hope he is also questioning the premise that functional programming is the reason why functional languages are unpopular. Every time I wanted to dive into functional programming I was very quickly frustrated with the abysmal tooling around them and while that didn't really prevent me from trying, I simply found a better use for my time.
Most recent example: Clojure wanting me to choose one of multiple package managers before starting my first project. Before that it was package management nonsense in Haskell, and before that some Scheme interpreter not being able to even give a stack trace on errors.
IMHO a really underrated feature of Rust is how friendly its tooling is towards its users. I'd really like to see something like that for functional programming.
Elixir has awesome tooling and developer experience, its over 10 years old built on a vm thats 35 years old.
Has communities dedicated to domains around embedded systems, distributed/fault tolerant system, web development, machine learning, data pipe lines, ETL, etc.
It's just not in the ML or LISP families.
https://gleam.run/cheatsheets/gleam-for-python-users/
Best of luck with improving tooling, but it's not the answer.
> abysmal tooling around them
F# has amazing tooling.
Debugging works out of the box in Visual Studio and Rider, and it's impure enough I was able to get comfortable quickly and .NET core has a crazy amount built in (e.g. no fuss JSON serialization). I ported a project from C# to F# and the old bash/powershell scripts to publish a standalone executable are now just F# scripts you run with `dotnet fsi`.
If you're a beginner, you can choose any one and there's very little you're missing out or getting locked into. You only need to worry about the choice when you start having complex development workflows.
In comparison, the JavaScript ecosystem is much, much more divided. There are different ways to write modules, different ways to build them, different package repositories, etc..
I found this to be false in practice: I did choose any one (lein actually, because my IDE suggested that it's the one you'll want to use when you don't know better). The consequence was that the examples from the Clojure page didn't work and/or printed totally different output, because they made a different choice.
It's the kind of thing where a Clojure expert would say: they are different tools, of course their output is different, but it doesn't matter because that's only the tool output and the net effect is the same. But in practice, a newbie will struggle solving very simple problems because the tutorial doesn't match reality.
Contrast that with the "rust book" (more or less the official tutorial) in which every single example behaves 100% exactly as described in the tutorial, from installing the toolchain to very complex, language-specific issues (yes, of course I'm referring to the borrow checker).
Back when code was shared more in ideas than implementations, this was truer. All too often today, first thing you need to do is import a package.
I kind of agree some more clarity would be helpful but we don't have a lot of enthusiastic young programmers in Clojure land who like making super accessible stuff
It's just kind of assumed you'll put the work in because Clojure is different enough that you probably have a good reason to be here
Btw if you want anything Clojure Google Clojure Slack and they'll help you there
Uh-oh...
You know, I was just programming in Python yesterday, and I was once again reminded of how ANNOYING a language it is... how annoying it is that it's so popular that I'm essentially forced to code in it.
Especially now that a bunch of (probably needed) changes have been made in half-assed ways that interact clunkily with its original rather, um, idiosyncratic structure, syntax, and philosophy, which for a long time were determined almost entirely by one person's idea of what was intuitive.
I mean, it's not JavaScript-level annoying or Perl-level chaotic, but it's a pretty damned annoying language.
> Although our tools have continued to improve (such as golang),
Uh-oh...
Another language that grabbed some popularity by fixing some things, but still fails to systematically Do Things Right, even though we're now like 50 or 75 years into this whole computer thing, and are at a point where we ought to have a mature understanding of what Right is and the time to act with deliberation.
One of the ways it grabbed that popularity was, of course, by looking familiar and unintimidating to people who don't like "weird languages".
> By making different tradeoffs, these issues can be mitigated and a more broadly-appealing functional language can be built.
Uh-oh...
Proceeds to give zero indication how to achieve this.
f(g(), h())
Of course a well designed imperative language could also avoid overspecifying deterministic semantics and open itself up to similar optimizations, but for various reasons that hasn’t caught on. One example would be specifying the conditional to select a branch with a true guard nondeterministically rather than deterministically in the order of appearance in the program text. Dijkstra’s EWDs give many practical examples of why one might want such a thing.Another example would be deducing when statement composition is symmetric and allowing nondeterminism when it is. For example if f and g don’t have access to each other’s data then the following can be executed in two threads even with mutation:
f(); g()
Side effects will appear nondeterministically though which may or may not be a problem. As always an algorithm needs to be designed for the semantics the language has not those the programmer wishes it does.Having said that, having something like Daedelus in there as well would give a handle on temporal-based determinism, and then some allowance for delimited continuations would top things off nicely.
I'm curious as to what these different trade-offs are.
> My conclusion is that there are major, well-justified reasons for why people strongly dislike functional languages.
My conclusion is because most everyone is taught to think empirically and 'play computer' that functional doesn't fit in their preconceived brains. I once had someone say SQL didn't make sense because it's SELECTing fields (i.e. vars) before they're defined/assigned later in the (binding) expressions.
People having trouble with FP is like how people who learn databases using ORM's don't deal well with SQL as expressions of set operations.
There are varying limits to how much people like and handle abstract constructs before applying the construction to the data at hand but you can do a whole lot of effective and unsurprising development before getting to such esoteric levels.
Edit: I was super-excited to open the link, and now on re-reading expect this new FP language to be as much an advancement as Go was to 'systems' programming. I hope I'm mistaken. Also odd that only Haskell and Lisp were mentioned when there are so many others. On the plus-side if Google were to make F# and back it as well as they have Go, that would be a win-win.
I thought FUD stood for Fear Uncertainty Doubt—it's usually used to indicate that something is designed to sow fear for clicks or for some ulterior motive, not for insubstantial non-announcements.
Did something in this post evoke fear?
I'm sure there are a multitude of different reason and likely require different conflicting tradeoffs to address
Look at us salivating for his big unveil -- we've probably already written more than he did
Looks like the syntax is taking shape at least.
> Theoretically, functional programs should: have fewer bugs, be easier to optimize for performance, allow you to add features more quickly, achieve the same outcome with less effort, require less time to get familiarized with a new codebase, etc. With a dynamic, functional language you could enjoy all of this simplicity.
In my experience use of static typing has fewer bugs and better performance than my usages of dynamic languages on all but small or short-lived projects.
I suppose this will round-out Google languages: Go, Dart, and _, until they make their own scripting or an actual systems language.
[0] https://www.onebigfluke.com/2022/11/the-case-for-dynamic-fun...
In so far as I am aware, research doesn't seem to provide compelling evidence one way or the other here.
Haskell is by far the best programming experience I've ever had (all aspects included), and it's damn fast. It's just not C/C++/Rust fast in nearly all cases.
Having said that, going functional for 'parallelism advantage' (speed) is a fool's errand (for now).
The same thing is said about how incredibly fast JIT has become. (But AOT is faster!)
Want speed? C/C++/Rust.
Julia has a lot of great ideas in it for sure. Why hasn't it gotten more popular?
At the moment, Julia is a nice language at v1alpha1 for scripts and data exploration.
And NB, python also doesn't offer many of these features, such as dependency management and simple single-binary builds. Yet it's popular.
Building large scale, low latency systems is really hard. Handling concurrency and shared state is hard.
Heck, even functional programming is hard to grok for most people. The evidence is in its popularity (or lack of it).
There's no large mystery why we all are not using functional programming exclusively: because it's hard. Imperative, with all it's drawbacks it's easier to grasp and closer to how hardware works. Most people find it more natural, there's no big conspiracy.
But (there's always a "but"), the functional paradigm is essential to solve all those hard problems. It provides many tools where many common pitfalls are essentially avoided, but gaining a comfortable grasp of those tools takes work and it's not easy as many claim.
They seem easy after you've had the "aha!" moment, but it's like advanced math, getting there takes time and a certain proclivity to it. Once you develop some sort of intuition, you tend to forget the effort it took to gain it.
In any case, I love languages and new ideas, so I hope he succeeds (or fails in an interesting way where we learn something new).
It's a laudable aim, and I wish you all the best with it. A new language with it's own 'zen', similar to the 'zen of python' but with a functional flavour, is something I'd love to see, and I think it'd do well.
Is there something I can read that's a little more specific about the "different tradeoffs" you have in mind?
Personally, I hate type systems. I mean, I tolerate them, but >90% of the benefit I get is via better auto-complete (an possibly better performance).
Functional languages (that aren't lisp derived*) all seem to love complicated type systems. And in these systems, at some point I experience the same abstraction collapse as I do in a java code-base when I have to sift through 87 layers of interfaces and sub-classes.
I'm also, self-admittedly, a devotee of the New Jersey style of design, and consider usefulness to be much more important than correctness.
*The lisp ones are kinda fun, but I always end up back in dirty-old common lisp where I can do crazy do* shenanigans instead of functional lisp land.
It's not an option to write (too) incorrect software, even if doing so is a lot faster. At the end of the day, the software needs to do its work.
Everything would be an event: The computer powers on, user presses a key, an app icon is clicked, OS launches a background task, or an app wants to call its internal routine.. and a central scheduler or something sends that event to all available CPUs/cores, that could work on it simultaneously preferably without needing to worry about getting in each other's way.
I'm sure this idea has been around for a while and already has a name. Does anybody know?
> My conclusion is that there are major, well-justified reasons for why people strongly dislike functional languages. The hypothesis I aim to test with a new programming language is: By making different tradeoffs, these issues can be mitigated and a more broadly-appealing functional language can be built. With such a language, I hope that the true promise of functional programming for parallel computing can be widely realized.
What are those reasons, in your view?
I think people forget how expensive it is to serialize/deserialize data between machines/nodes.
Then you have to think of performance characteristics, and debugging, onboarding new engineers, and code reviews.
I think it's easy to see why the industry doesn't use FP languages, and because of this people see no reason to even bother with it.
I myself would rather use ML family languages or Clojure or BEAM but it will never happen. The majority want to use Python or Go since they are slim on abstraction and easy to pickup. There's no bullshit involved.
I am an enthusiastic, but far from expert, Haskell programmer. I wonder if Brett is thinking of a more Python-like interpreted functional language?
Is there anything ~technical you can share beyond desires and disappointments that leads you to believe this is a reasonable hypothesis?
But from such a specifying approach to a working system, is a long way.
Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.
I'd like Scala to be more successful although I'm using Java and a bit of Kotlin now.
There's no reason JavaScript couldn't transparently implement parallel map/filter/etc. Other than the fact it is really hard to do. On the other hand a lot of the things JavaScript engines do today are also really hard, so maybe one day it'll happen.
"...Fuuuuck." lol
https://mobile.twitter.com/haxor/status/1580959518984241158
It will never be popular.
think again
If you have delimited continuations then you can construct coroutines/threads/await/async, promises etc.
I guess that this might be suitable for many scenarios thanks to nodejs, but the runtimes it relies on are not exactly small.
Of course, I would do the same in their position.