News for hackers. Stuff that matters.
Re:Parse, Don't Validate by thedataangel on Monday July 22, 2024 @06:37AM (#41032876)
`Void` is not equivalent to the unit type. Haskell _has_ a unit type, called `()`. A return value of `Void` represents a function which is unimplementable, or which never terminates. It can also represent an unreachable possibility, e.g. in the type `Either Void a`.
Re:Parse, Don't Validate by valenterry on Monday July 22, 2024 @07:16AM (#41033111)
Yeah - I just wanted to emphasize that this article will be confusing for most developers. Since most are used to void from languages like Java. And the meaning of that void is different from the one in Haskell.