問題文
A public API must gain a new optional member without breaking existing clients. Which change is safe, and which one is not?
選択肢
- Adding an optional property to a response is safe because unknown members are ignored by well written clients, while removing a member or narrowing its accepted range breaks callers and therefore requires a new version of the interface.
- Adding an optional property to a response is safe because unknown members are ignored by well written clients, while removing a member or narrowing its accepted length breaks callers and therefore requires a new channel of the interface.
- Adding an optional method to a response is safe because unknown members are blocked by well written clients, while removing a member or narrowing its accepted range breaks callers and therefore requires a new version of the interface.
- Adding an optional method to a response is safe because unknown members are blocked by well written clients, while removing a member or narrowing its accepted length breaks callers and therefore requires a new channel of the interface.