News for hackers. Stuff that matters.
Re:Tests aren’t enough: Case study after adding type hints t... by skrimp on Monday October 18, 2021 @07:43PM (#28913267)
C++ is an extremely mainstream language that can write a fully general version of compose with variable arguments.

https://godbolt.org/z/h7n8Y7qf1

Like sure, you can't write out a type for the entire overload set. Overload sets don't have types, but functions do. However, I don't think you'd ever actually want to write out the type of the compose function. Instead, I think it would be more reasonable to request that every intermediate function call is type-checked with fully specified types. In C++ this is the case.

Re:Tests aren’t enough: Case study after adding type hints t... by Matheus28 on Tuesday October 19, 2021 @02:57AM (#28915520)
Great implementation of what the parent comment asked. Not only that, but the compiler managed remove all the abstractions.

(very minor nitpick: I'd pick `auto&& x` over `auto x`)