Rendered at 16:11:27 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
gavinray 9 minutes ago [-]
> Acceptance proves, of the function's translation into the calculus, that for inputs and a heap meeting their declared types it does not get stuck and does not return a value outside its result type.
TypeScript's type-checker already proves the latter bit, no?
SSchick 5 minutes ago [-]
I'd like examples/cases this catches that aren't handled by the existing compiler.
conartist6 3 hours ago [-]
There's there is this little, really piddlingly small problem that TS isn't a sound language. Its type system, for convenience, pretends JS works in ways that are not how JS ACTUALLY works
You can of course slap a formal solver in without knowing that, which is evidently what this person did
austin-cheney 2 hours ago [-]
Yes and no. TypeScript's type system is duck typing, but if you type absolutely everything it does closely describe actual JavaScript behavior. You can even set rules in your tsconfig file to forbid implicit null or undefined, but I don't do that in my own code.
evmar 35 minutes ago [-]
The page talks about soundness in the second paragraph, not sure how you missed it.
conartist6 2 hours ago [-]
If you're interested I am happy to offer what I know on the topic but it won't be good news for you.
Basically if you want your project to survive and thrive you're going to have to implement a new programming language that runs using the semantics that Typescript claims to have rather than the semantics it actually has because it's Javascript under the hood.
I mean, if you want to despair, just try to account for the potential behavior Javascript Proxies could introduce in your Lean proofs.
If you do it correctly, Lean should tell you that virtually every Javascript program that has ever been written is possibly wrong, mostly for reasons that have to do with the lies Typescript tells about Javascript
bazoom42 30 minutes ago [-]
Can’t the type system reject code which undermines the soundness of the type system?
You can of course slap a formal solver in without knowing that, which is evidently what this person did
Basically if you want your project to survive and thrive you're going to have to implement a new programming language that runs using the semantics that Typescript claims to have rather than the semantics it actually has because it's Javascript under the hood.
I mean, if you want to despair, just try to account for the potential behavior Javascript Proxies could introduce in your Lean proofs.
If you do it correctly, Lean should tell you that virtually every Javascript program that has ever been written is possibly wrong, mostly for reasons that have to do with the lies Typescript tells about Javascript