logoalt Hacker News

jppittma • today at 3:02 PM • 3 replies • view on HN

Where are you going with those goal posts?


Replies

Philpax • today at 3:48 PM

Nowhere. It's the same argument as upthread. A language that forces downstream consumers of an API to correctly deal with all possible outcomes would have prevented this.

rini17 • today at 3:58 PM

Goalposts are fine. If crypt did return union type, C still allows cowboy programmers to straight extract the char* without any check whether it's valid. So we'd end up in exactly the same situation.

cannonpalms • today at 4:20 PM

I don't think the goal posts were moved. The comment you replied to referred to the "use"--not the existence--of sum types.