News for hackers. Stuff that matters.
Re:Idris: A Language for Type-Driven Development by mcphage on Friday January 20, 2023 @03:38PM (#34459580)
> 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.

Re:Idris: A Language for Type-Driven Development by josephcsible on Friday January 20, 2023 @07:35PM (#34462385)
For 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.
Re:Idris: A Language for Type-Driven Development by ekidd on Friday January 20, 2023 @08:32PM (#34462815)
> 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.

Re:Idris: A Language for Type-Driven Development by still_grokking on Saturday January 21, 2023 @03:24AM (#34464846)
> 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.

Re:Idris: A Language for Type-Driven Development by ddejohn on Friday January 20, 2023 @11:01PM (#34463750)
To be honest, boilerplate is where I think I'd appreciate code generation the most.
Re:Idris: A Language for Type-Driven Development by mcphage on Saturday January 21, 2023 @03:34PM (#34470191)
That makes sense, but it also seems like a “the cause of, and solution to, all of life’s problems” sort of situation.