Coalton Blog

coalton-lang.github.io · Company blog · on HN since 2021

The development blog of Coalton, a statically typed functional language embedded in Common Lisp with ideas from Haskell and OCaml.

What HN saysHN commenters point to Coalton as a way to get typed functional programming in Common Lisp, and mention its Mine IDE.
40HN people shared it
31linked it in comments
15stories submitted
314story points
3 months agolast shared
2021people per year2026

Most-shared posts

  1. 1
  2. 2
  3. 3
    Mine, a Coalton and Common Lisp IDE
    7 people · 5 points · first shared 2026 · discussion on HN
  4. 4
    Using Coalton to implement a quantum compiler (2022)
    4 people · 71 points · first shared 2022 · 4 comments on HN
  5. 5
    One Reason Typeclasses Are Useful
    3 people · 61 points · first shared 2021 · 45 comments on HN
  6. 6
    A preview of Coalton 0.2, a statically-typed Lisp
    3 people · 3 points · first shared 2026 · discussion on HN
  7. 7
    Mine, an IDE for Coalton and Common Lisp
    3 people · 1 points · first shared 2026 · discussion on HN
  8. 8
    Coalton Advent of Code Contest
    2 people · 1 points · first shared 2021 · discussion on HN
  9. 9
    Reference
    2 people · first shared 2022

What HN people wrote when they linked it

nextos · 2025-02-22
CLOS is great, but CL also supports pure typed FP with https://coalton-lang.github.io Coalton progress is discussed briefly in the OP: https://lisp-journey.gitlab.io/blog/these-years-in-common-lisp-2023-20…
mmmm2 · 2022-02-02
I can't speak from a professional level about this, but I'll tell you why I started using Common Lisp for my personal development. One day I was thinking it would be awesome if someone created a really powerful language with great facilities for abstraction: first class functions, objects, meta objects, etc. It should use dynamic typing during development with an excellent REPL and a built in debugger available everywhere, but it should have the ability to add type declarations when the code got more settled. Even better, this language should include ways of hinting to the compiler how to make a chunk of code faster, and if that wasn't enough, you should be able to replace chunks of code seamlessly with highly optimized C code. I thought about how to implement a language like this for a while, but when I looked into it I discovered Common Lisp does most of this already. It's static typing isn't perfect, though now there is https://coalton-lang.github.io/ if that's your thing. So that did it for me, but really this is only part of what you can do with Common Lisp. I think it still has a niche in places where the "right thing" isn't know yet. For example, I read a Reddit post saying that Common Lisp would be a poor choice now for a web startup, and that Paul Graham overstates Common Lisp's case as the reason for Viaweb's success. This is probably true in 2022, but I think it's instructive to look at why Paul claimed Lisp was so helpful back in 1996. There was no…
dieggsy · 2026-07-17
CL also has pretty much arbitrarily extensible syntax: - https://sr.ht/~dieggsy/whisper/ - https://dieggsy.com/json-literals.html And could also be used to build languages, supporting more modern programming paradigms (though yes, I believe Racket does make this easier): - https://coalton-lang.github.io/ I also might have written the Common Lisp example using reduce as well, which is in the standard library, but that's preference. Nice to have the option though: (defun calculate (instructions) (reduce (lambda (result op-value) (destructuring-bind (operation value) op-value (case operation (:add (+ result value)) (:subtract (- result value)) (:multiply (* result value))))) instructions :initial-value 0)) (calculate '((:add 5) (:multiply 3) (:subtract 4))) ;; => 11
vindarel · 2026-07-10
Don't miss out, we had new excellent editors and tools being released in the last months: Mine: a complete, single-download application that comes with everything needed to experience the interactive and incremental development programming workflow, including hot-reloading and on-the-fly debugging. For CL and Coalton. https://coalton-lang.github.io/20260424-mine/ OLIVE: a new hand-made plugin for VSCode. ICL: a new REPL for the terminal and the browser with advanced features. as a bonus: a JupyterLite kernel based on JSCL that runs 100% in the browser. find them all: https://lispcookbook.github.io/cl-cookbook/editor-support.html
wild_egg · 2026-07-10
> unless you literally have written a new type system and compiler This is entirely possible with plain lisp macros. See https://coalton-lang.github.io Having that natively available as plain Common Lisp code is a very different thing from your "just read a text block and compile it as rust code!" concept. Or at least, the tool chain gymnastics required to make a C program emit its own source in another language... Why?
Jach · 2026-04-05
Pedantic but Lisp is not "untyped". (Neither are JS or Python.) All data has a type you can query with the type-of function. The typing is strong, you'll get a type-error if you try to add an integer to a string. Types can be declared, and some implementations (like SBCL) can and do use that information to generate better assembly and provide some compilation-time type checks. (Those checks don't go all the way like a statically typed language would, but Lisp being a programmable programming language, you can go all the way to Haskell-style types if you want: https://coalton-lang.github.io/)
reikonomusha · 2026-02-25
Coalton [1] adds Haskell-style types (so typed lists, type classes, parametric polymorphism, ...) to Common Lisp, and compiles to especially efficient code in SBCL. [1] https://coalton-lang.github.io/
fiddlerwoaroof · 2026-02-22
Coalton ( https://coalton-lang.github.io ) is the sort of thing I like: a Haskell-style language hosted inside a very dynamic one with good interop.
brabel · 2025-12-23
> Statically typed clojure Well, if you also like Common Lisp, there's Coalton, which is Common Lisp with a Haskell-like type system: https://coalton-lang.github.io/
lisper · 2025-05-26
Type declarations in ANSI CL are promises you make to the compiler in order to allow it to generate faster code. The compiler can also use this information to generate compile-time warnings and errors, but it is not required to. This makes CL's native compile-time type system good for making your code fast, not so much for making it reliable. But it's straightforward to layer a proper modern type checker on top of CL, and in fact this has been done. It's called Coalton: https://coalton-lang.github.io/ IMHO this is the Right Answer: types when you want/need them, dynamism when you don't. It seems like a no-brainer to me. I've never understood why so many people think it has to be one or the other. It seems to me like arguing over whether the window on the bike shed should be on the left or the right. If there is disagreement over this, just put in two windows!
shawn_w · 2024-12-17
Racket has Typed Racket, which while not Hindley-Miller can do some type inference. There's also the plait language which says its type system is similar to ML: https://docs.racket-lang.org/plait/index.html And Hackett, inspired by Haskell: https://lexi-lambda.github.io/hackett/ And Common Lisp has coalton: https://coalton-lang.github.io/
medo-bear · 2022-09-07
> I'd kill for a LISP with strong(er) static typing interestingly, the person you are replying to is an author of this little lib https://coalton-lang.github.io/
jtmoulia · 2021-10-01
Common lisp has a smaller community than the currently most popular languages, but I'm consistently impressed by the range of and quality of libraries the community has created (despite all the "beta" disclaimers) [1] Regarding type-checking, common lisp is expressive enough to support an ML dialect (see coalton), and is easily extended across paradigms [2] 1. https://project-awesome.org/CodyReichert/awesome-cl 2. https://coalton-lang.github.io/
agambrahma · 2025-08-12
Reference for Coalton: https://coalton-lang.github.io
gugagore · 2025-05-26
> But I don't think of these as programming language I don’t want to get too caught up in what counts as a programming language, but you can absolutely write programs in a language like Lean, e.g. computing factorial 10. The fact that you can also write proofs doesn’t negate a system's status as a programming language. It’s worth noting that the official Lean documentation reflects this dual use: https://lean-lang.org/documentation/. So there’s no conflation... just a system that supports both orientations, depending on how you use it. > SQL [...] ought not to be conflated I agree that SQL isn’t a general-purpose programming language, but you said something to the effect of "I don't understand what meaning a program has beyond what it does", and if you know about SQL, then I think you do understand that a program can have "computational meaning" that is separate from its meaning when you run it through an interpreter or processor. > You want Coalton :-) Thanks for the pointer. I am going to read https://coalton-lang.github.io/20211212-typeclasses/ , hoping to eventually achieve clarity on the relation between multiple dispatch and type classes.. That said, my interest in generic programming pushes pretty hard toward dependent types. I’m increasingly convinced that many patterns in dynamic programs, especially those involving runtime dispatch, require dependent types in order to be typed. Coalton might help me understand better the relation also between interactivity…
trenchgun · 2021-10-02
That one is quite interesting indeed. And they use it for quantum computing research: "One of the state-of-the-art optimizing quantum compilers is an open-source program called QUILC with a companion quantum computer simulator called the Quantum Virtual Machine. Both of these programs are written in 100% Common Lisp, and contain a total of around 50,000 lines of sophisticated, mathematical, data structure–heavy code. And that excludes the plethora of first-party dependencies. Common Lisp is a fantastic language for developing these programs; it’s fast, stable, extremely flexible, and the developer experience is unmatched. But, both new and seasoned developers sometimes get tripped up and tangled in the web of complex data structures, and inadvertently introduce type errors that the relatively comprehensive test suite doesn’t catch. In addition, such developers heavily rely on documentation strings (“docstrings”) in order to discover what the probable inputs and outputs of the functions are, and those docstrings sometimes go stale. Coalton’s aim is to allow us to reap the benefits of Common Lisp, and not have to rewrite 50,000 lines of tricky code in order to realize some of the benefits offered by statically typed functional programming languages." https://coalton-lang.github.io/20211010-introducing-coalton/
cyrc · 2026-07-18
For those who are interested in common lisp There is a very nice IDE called Mine https://coalton-lang.github.io/20260424-mine/
aptenoforst · 2026-07-17
pjmlp · 2026-05-27
Also have a look into their IDE, https://coalton-lang.github.io/20260424-mine/
mepian · 2026-04-25
There is an explanation in the blog: https://coalton-lang.github.io/20260424-mine/ > However, the above is a tall order for someone just wanting to dip their toes in, to see if they have any interest in Coalton or Common Lisp. A couple hours on the weekend is easily sunk into getting configurations right, and the right subsystems installed, and the right paths setup, just so the first line of code can be executed. > mine is not Emacs. It aims to eliminate all of that, and be a Coalton/Lisp-first development environment, whose only job is to be a Coalton/Lisp-first development environment. But more than that, it needs to be accessible. A non-programmer should find it easy to download, install, and run mine with nothing more than a download link.
yenko · 2026-04-25
from https://coalton-lang.github.io/20260424-mine/ > mine is different in that it’s supposed to be as easy as the QBASIC or the Borland Turbo products of yore, but for Coalton and Common Lisp Woah this is awesome. I'm too young to have used them but I'm fascinated with the idea Borland Turbo Pascal, QuickBasic. Glad there is a lisp option now ;)
recursivecaveat · 2026-03-22
sourcepluck · 2024-10-16
I think personally that Coalton and the stuff its built on is crazy cool. Coalton is a little library you add to your Lisp, but, to quote the third link here: "In terms of its type system, Coalton’s closest cousin is Haskell." So Lisp's dynamism with all sorts of advanced typing. QVM, a Quantum Virtual Machine https://github.com/quil-lang/qvm Quilc, an "advanced optimizing compiler" for Quil https://github.com/quil-lang/quilc Coalton, "a statically typed functional programming language built with Common Lisp." https://coalton-lang.github.io/20211010-introducing-coalton/
anonzzzies · 2024-07-16
CL is a strong and often statically typed language; there are more expressive, even Haskell like implementations (https://coalton-lang.github.io/20211010-introducing-coalton/) with instant feedback, robust (old; underestimated how robust things get when some kid didn’t roll your npm yesterday). And yep, an expressive type system, like ts, is often turing complete so it can hang, but that’s not what I am talking about; trivial ts is incredibly slow even with type checking off; now non trivial ts is a joke. Why so many fans while no one can show even 1 example that is not slow?
wiml · 2024-01-26
I've been meaning to give Coalton a try: https://coalton-lang.github.io/20211010-introducing-coalton/ (found via a previous HN post)
dunefox · 2023-05-07
> But Lisp won’t compete in that field anyway. I wouldn't say that. https://coalton-lang.github.io/20211010-introducing-coalton/
adenozine · 2022-04-18
You might peek at Coalton. https://coalton-lang.github.io/reference/ I don’t think it has sum types, but it offers a rather sophisticated and very functionally oriented type system that compiles back to SBCL. It looks neat, haven’t found time to play yet…
gmfawcett · 2022-02-03
I'm fairly sure that their company created Coalton: https://coalton-lang.github.io/20211010-introducing-coalton/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close