The Bagel Language 🥯 September 16, 2021

submited by
Style Pass
2021-09-17 15:30:04

I'm calling it Bagel, and it's still in a stage where everything's changing, but I wanted to put the motivating ideas into words, to organize my thoughts and maybe get a little feedback.

Over the years I've developed lots of ideas and opinions - some specific to web dev, and some not - and as those tend to do, they've solidified into a language that's taken up residence in my head. At the very least it will be an interesting way to explore them and see what happens when they're taken further than usual; if I'm lucky it might even be useful to somebody one day.

To get down to brass tacks: Bagel will be a statically-typed, JavaScript-targeted language. It will keep many of the same syntaxes and semantics as JavaScript/TypeScript, except where there's significant benefit to breaking away from them. It will involve lots of nice little refinements and additions to the JavaScript paradigm, but it's mainly driven by two key ideas, which are really what make the whole project worth doing in my opinion:

I'm going to prioritize a first-class, batteries-included reactive web GUI experience similar in scope to what Elm or Imba offers, but I also want Bagel to be useful as a general-purpose language for writing server-side code, games, etc. I hope its compiler will one day be self-hosted. There will definitely be an opinionated all-in-one compiler/package manager/etc tool, and one or two editor extensions offering syntax highlighting. I'd like to do an LSP down the line too, but that will likely be pretty far away.

Leave a Comment