|
|
|
|
|
by gavinpc
2733 days ago
|
|
> When have you ever had to unnecessarily break API compatibility because something you thought was an Option[T] result turned out to be really a T, always? That would be a breaking change. And should be, if you're into that sort of thing. The objection is to the opposite case: What was a T is now an Option[T]. I don't know Scala specifically, but that's a breaking change in every typechecked language I know. Rich is arguing that it shouldn't be. But it could be possible even in typed languages through union types. For example, you can do this in TypeScript by changing T to T | undefined, which is a superset of T. |
|