TypeScript has a really neat way of changing the required-ness of fields in objects.
Partial<Foo> is the same shape as Foo, but all the fields are optional. Required<Foo> is the same shape as foo but all the fields are required.
miniblog.
Related Posts
I'm not sure how I feel about languages with auto currying.
Upside: Partial application is easy.
Downside: It's common to miss a parameter when refactoring, and errors can be unclear.
Upside: You can be generic on functions: a -> b.
Downside: An a -> b isn't very useful.
Adding LLVM control flow integrity to make exploits harder is coming to Rust: https://rcvalle.com/docs/rust-cfi-design-doc.pdf
The primary use case is mixing C/C++ with Rust: you have weaker memory safety guarantees and hardening is still necessary. You don't want a partial Rust port to reduce security!
Type signatures are optional in Haskell, but in OCaml you can even specify partial signatures (e.g. just one parameter).
Maybe return types are more valuable to annotate? I can often guess params based on the name, but I have to read the function body for the result.