News for hackers. Stuff that matters.
Re:Understanding contravariance by ajross on Friday June 22, 2018 @09:28AM (#17373764)
> so an unsound type system (or no type system at all) is not the answer

And my unpopular opinion is precisely that. "Sound" typesystems enforced at the expense of the kind of cognitive load we see here will hurt rather than help the expression of real world problems in code.

Literally, casting a C function pointer through a void* is a better answer. I'm serious.

Re:Understanding contravariance by willtim on Friday June 22, 2018 @09:35AM (#17373815)
But the problem of correct program construction does not go away. There is certainly a middle ground somewhere, beyond which proofs become too expensive for most users. For the sorts of systems I work on, the sweet spot is close to Haskell 98, for others it may well be Python (no types at all).