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 @08:29PM (#28913587)
This still technically reduces the generality of the given function since you are specifying that each function cannot have multiple overloads.

let f be a overload set matching the signatures {a -> b, i -> j} let g be a overload set matching the signatures {b -> c, j -> k}

compose(g, f) could be given a to return c or i to return k

Re:Tests aren’t enough: Case study after adding type hints t... by loup-vaillant on Tuesday October 19, 2021 @10:45AM (#28918648)
> This still technically reduces the generality of the given function

My point was that we are almost never hurt by that reduction.

> you are specifying that each function cannot have multiple overloads

Haskell has type classes, and if we restrict ourselves to local type inference it's fairly easy to have C++ style overloads without even that. So no, I'm not specifying such a thing.