News for hackers. Stuff that matters.
Re:Simon Peyton Jones – Haskell Foundation Podcast by jim-jim-jim on Sunday October 16, 2022 @03:31PM (#33226499)
One practical example: if you have a union of A|B, and you decide to add a third shape C to it, your program won't compile until logic for C is written in all the places where A and B are already being matched against. Refactoring often means changing data models, then letting the errors walk you through the actual implementation details.
Re:Simon Peyton Jones – Haskell Foundation Podcast by garethrowlands on Sunday October 16, 2022 @05:07PM (#33227209)
Yeah that's how it's supposed to work. Historically, Haskell didn't always make incomplete patterns an error, even now the checker isn't perfect, and even if it was people can still put wildcard patterns.