Remix.run Logo
▲ jeremyjh an hour ago

I really liked your article, and I haven't read or absorbed all of it yet but I agreed with your points on this topic.

I think Lean could perhaps serve in most server application use cases (and many others - roughly any use case where you could use Haskell), and Aeneas or something like it could leverage Lean only for verification. https://lean-lang.org/use-cases/aeneas/

▲danilafe an hour ago | parent [-]

Absolutely. Libraries like servant in Haskell, too, relied on extensions to the language (was it data kinds and GADTs?) to make for some very, very sleek abstractions. Lean comes with these language features, but in a single unified type system, and it has even more goodies!

▲jeremyjh an hour ago | parent [-]

What was surprising to me is that (at least some) Lean code is easier to understand than the machinery behind Servant, since you are just using normal code to operate on types.

▲nylonstrung an hour ago | parent [-]

This to me is the single most mindblowing part of Lean that has not been fully taken advantage of yet: that types themselves are first class and fully programmable in a way indistinct from normal code

And it compounds with Lean's dependent type system and the ability for proofs to be "bundled" into said dependent types and then erase at elab time