JavaScript became more than code — a culture, a dynasty, a paradox. In the shadow of this legacy, a bold team embarked on an athletic, and deeply inspiring adventure: rewriting everything…
For over decades, web developers have lived in a love–hate relationship with JavaScript, and this has affected their own sense of community, with internal disagreements turning into verbal altercations, sometimes brutal and cruel.
These are the facts. We criticize it, we mock it, we reinvent it — and yet, we often (if not always) come back, partially or not.
Because, deep down, the web is JavaScript (or almost): the lingua franca of the browser, the keystone of everything that runs inside a tab.
And yet… between the endless undefined is not a function, the inconsistent APIs, and the jungle of an evergrowing ecosystem (which can sometimes be overwhelmed by his proposals), it’s hard to find a line of reasoning that makes lasting sense.
So we look for escapes: CoffeeScript yesterday, TypeScript today, Elm or Reason for the boldest.
And now… there’s PureScript — a quiet language (but one of rare elegance).
I know I know, you may be suffering from JS fatigue, like I was (“oh, more promotion from an official team member, infiltrating dev.to…”), and you’re thinking that it’s irrelevant to come up with yet another thing in this saturated universe.
But.
I am a freelance developer, and I do not do any promotion.
That’s when things start to take a turn toward something completely different. It’s not just a thing, a tool, a framework, a bundler… or even a mere language. It’s a parallel universe, both independent and connected, which stands on the shoulders of profound epistemological mathematics. We’ll get back to that.
JavaScript, the Dynastic Dystopia
Let’s face it: JavaScript has won.
It reigns over the web like a dynasty: (almost) uncontested, omnipresent, eternal.
From browsers to servers, from build tools to mobile apps, a lot of things eventually bends to its rule.
But it’s a dynasty with a dystopian flavor: a vast, prosperous empire, yet inherently unstable.
Each new framework promises order and simplicity, but also sows significant additional chaos. Nothing seems to be completely resolved. This is probably what contributes to such dynamism, but it is also what can unnecessarily exhaust some people.
Dependencies multiply, paradigms collide, and peace always seems one npm install away.
You can’t leave this empire, the web is its territory. It holds up, and it does the job — which is no small feat (far from it). And no one is rude enough to claim that there isn’t wonder in many places within this ecosystem.
So what remains?
The art of navigating it: creating your own bubble of confidence, and diving into it fully, without fear.
That’s where Purescript comes in.
PureScript: Haskell for the Great Web (and more)
PureScript is a purely functional language (strongly) inspired by Haskell, compiling down to plain and optimized JavaScript. As such, it encapsulates all the power of Category Theory (remaining dev-oriented), and still can run on browsers, desktop (e.g. Electron), backend (Node), etc.
N.b. Because the subtleties of Node's Event Loop are misunderstood or disliked by non-JS devs, Haskell is sometimes preferred for backend purposes. PureScript has now made these subtleties much easier to handle.
In practice:
- Strong static typing — everything is checked before runtime. Functional purity — no hidden side effects.
- Readable, efficient output — no black magic.
- Powerful type inference — the compiler often knows your intentions before you finish typing.
- Algebraic data types and pattern matching — express complex logic elegantly and safely.
- Effect system — explicit control over side effects, concurrency, and async behavior.
- Extensible records and row polymorphism — flexible data structures without sacrificing type safety.
- Typed foreign function interface (FFI) — seamless bridges between PureScript and JavaScript.
- Ecosystem synergy — works hand-in-hand with frameworks like Halogen, React Basic, or Concur.
- Small, composable abstractions — build large systems from simple, predictable parts.
- Mathematically grounded — category theory isn’t decoration here; it’s the backbone.
- Cross-platform by nature — browser, Node.js, Deno, Electron, Cloudflare Workers — it just runs.
- And… so much more. It’s another world…
PureScript lets you reason about your code with mathematical precision, while still building modern, reactive, performant apps.
It’s the Hextech gem, the philosopher’s stone, allowing clarity to emerge from a world saturated with conflicting forces.
Writing JavaScript without suffering from it
Take asynchronous effects, for example.
In JavaScript, Promises are convenient but quickly spiral out of control — nested callbacks, silent errors, ghost exceptions.
In PureScript, effects (Effect, Aff) are described and typed explicitly.
No more partial functions. The compiler knows when you’re touching the outside world, and makes you handle it properly.
And yet, you’re still within the JS ecosystem: you can import npm libraries, use React through Halogen or React Basic, or even handcraft JS interop directly. You’re not lost.
PureScript doesn’t flee the dynastic dystopia: it reveals islands of long-lasting structure within it, and ensures their sustainability, development, promotion, expansion, and scaling.
The Art of Compromise: Purity without the Ivory Tower
One of the most compelling aspects of PureScript is that it does not force you to pick a side.
You do not have to choose between the pure, safe, and elegant and the flexible, fast, and pragmatic.
PureScript offers a genuine compromise — perhaps the smartest one seen around this duality.
I’ll let you write everything you love about functional programming (strong typing, purity, composition…), but I won’t lock you in an ivory tower.
If you want to use JS libraries, APIs, or even write some JS yourself, you can.
Just declare a foreign import in one line.
I want you to do things because you understand why, not because I force you to.
This isn’t a weak compromise — it’s a collaboration between two worlds.
You don’t sacrifice native safety or pragmatic flexibility — you make them work together through anti-corruption layers.
There’s no need to throw away your JS experience or deny your love of functional purity.
You can do both — and this upward hybridization is deeply promising: the very best of both world is kept intact.
No downward mixing, no sacrifice, no ideological war between paradigms: just a fluid membrane, allowing the boundary to shift — sometimes to 100% PureScript, sometimes close to 100% JS, if you feel so.
Instead of turning the table upside down, PureScript ensures continuity, compatibility, and a transition without violence.
You could write X(< 100)% of your code in PureScript, and the rest in JS without guilt or pressure.
It’s a rare philosophy: a language that values not just purity, but maturity.
Conclusion: the Web as a playground, not a prison
JavaScript has become the universal runtime. You can’t escape it.
And that’s perfectly fine, as long as you can really choose how to enter it.
TypeScript tries to make JS less dangerous by adding safeguards. And we can thank it for that.
PureScript, on the other hand, comes from a different world, the purely functional one, and builds a bridge to JS. There is no interference, no hidden language homomorphism, no subconscious mental pollution.
It took me almost 2 years to understand a satisfactory portion of these lands, even in its most remote regions. I read almost every night on this. This is not a small episode: it is an endless series, full of academic work in progress. In any case, the front door is now increasingly easier to open, thanks to high-quality courses made by enthusiasts, and what seemed impossible yesterday has become reality today.
PureScript offers a rare path to achieve your ends with JS: to harness its power without inheriting its potential chaos, to turn its flexibility in a plain quality, to create without betrayal, and to rediscover the joy of writing code where every line does what it says, and says what you think.





Top comments (1)
That's cool I've never heard about this language! I especially like the idea of mixing it freely with JS, I have tried converting a JS project to Typescript and it's always been close to a full rewrite - so a typed language which mixes freely sounds amazing.