3 ms·
> the logic itself can be produced automatically via the filling of type holes Does that work in anything but boilerplate code? Like, hole filling won't be ab
by mcphage 4y ago
> the logic itself can be produced automatically via the filling of type holes
Does that work in anything but boilerplate code? Like, hole filling won't be able to decide between then and else clauses in a conditional, for instance, because both clauses return the same type. And conditionals are one of the most basic data flow structures.
- josephcsible 4y agoFor Boolean conditionals, you're right. But there are richer conditionals that make certain variables available in only one clause of them, e.g., matching on whether an Either in Haskell is Left or Right, or whether a Result in Rust is an Err or an Ok.
- ekidd 4y ago> Does that work in anything but boilerplate code? It depends on the problem and the language. The most impressive I've ever seen was implementing "call with current continuation" as a monad, given nothing but the type signature. Generally, it works best in strongly-typed, functional languages.
- still_grokking 4y ago> The most impressive I've ever seen was implementing "call with current continuation" as a monad, given nothing but the type signature. That sounds cool. Where to find this? I get only irrelevant search results.
- ddejohn 4y agoTo be honest, boilerplate is where I think I'd appreciate code generation the most.
- mcphage 4y agoThat makes sense, but it also seems like a “the cause of, and solution to, all of life’s problems” sort of situation.