Formalizing Julia in Lean (and finding 400+ bugs in Base)

I mean… programmatically checkable interface designs are often proposed in Julia, but they often end up not working well enough because Julia is reliant on a permissive system. Even errors like “undefined variables” or even “no such thing exists” are only catchable runtime error and not something Julia will refuse to compile. When it does work well enough for one class of problem, it still could break generics (or even things like dual number used in autograd) and so on if the check was too conservative. Lean avoids this issue because anything that can be formally proven can be made correct. A standard static analysis tool doesn’t have that resource.