You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript complains that the 2nd generic is not provided. It's all or nothing. It's not desirable to have the end-user copy/paste the arguments into the 2nd generic position:
In general I'm suspecting this is not worth the effort. To quote Tim Sweeney:
"With correctness proofs, you often run into the problem that the theorem you aspire to prove is approximately as lengthy and complicated as a well-written but unproven implementation of the program itself.
[...]
If your theorem is as complicated as a simple but unproven implementation of a program, then the former is no better than the later, because you can just as easily have bugs in your theorem (e.g. causing the wrong things to be proven) as bugs in your program (causing unexpected runtime behavior)."
-- Tim Sweeney
The text was updated successfully, but these errors were encountered:
Current branch in progress: https://github.com/mlhaufe/brevity/tree/typescript
Desired usage (as of March 26):
This requires two features though:
Without this feature the end-user is required to annotate every
Data()
usage withas const
:Because of this issue, the desired syntax is not viable.
This works but the properties are of type
any
:This does not work:
TypeScript complains that the 2nd generic is not provided. It's all or nothing. It's not desirable to have the end-user copy/paste the arguments into the 2nd generic position:
Notice the additional syntactic overhead for this
Data
definition. From 1 line to 3 lines. Inlining the types make readability worse:An object literal is even worse.
In general I'm suspecting this is not worth the effort. To quote Tim Sweeney:
The text was updated successfully, but these errors were encountered: