March 22, 20253 minutes
Typescript is not the destination, it's a milestone along the way to a safer Javascript with fewer footguns and more guardrails.
We love JavaScript. It’s the lingua franca of the web, powering everything from interactive UIs to backend services. It’s flexible, dynamic, and has an absolutely enormous ecosystem. But let’s be honest, sometimes JavaScript feels less like a helpful tool and more like a wild child in need of supervision.
Like a rambunctious child left unsupervised, JavaScript has its… quirks. null
, undefined
, implicit globals, the mysteries of this
, and the ever-present specter of runtime errors lurking in the shadows. TypeScript stepped in like a well-meaning oldest sibling, trying to instill some order and discipline. And it’s done a remarkable job bringing type safety to the party.
But what if, instead of just adding rules on top of the existing structure, we could rebuild from the ground up? What if we could create a language that retains the joy of JavaScript – its expressiveness and ecosystem – but makes the parents feel a little more at ease about their progeny.
That’s the idea behind Chicory, a new programming language I’m building to be JavaScript’s nanny. Chicory is Mary Poppins meets Hindley-Milner, arriving with a spoonful of strongly-typed sugar and a firm but fair approach to language design.
Chicory isn’t just about web UIs. It’s about bringing sanity and safety to the entire JavaScript ecosystem. Here’s how Chicory is aiming to be the nanny JavaScript desperately needs (if not the one it deserves):
null
and undefined
are banished to the naughty step, replaced with a cleaner optional type system. with
? Sent to bed without supper. Chicory aims to be carefully curated, keeping the good parts of JavaScript and leaving the Bad Parts™ out altogether.if/else if
chains. Match expressions bring clarity and elegance to complex conditional logic.if
as an Expression: No more nested ternary operators. if
is now an expression, making your code flow more naturally.Sound like your cup of tea java coffee chicory? Give a star and/or contribute at https://github.com/chicory-lang/compiler