[swift-evolution] [swift-evolution-announce] [Returned for revision] SE-0089: Renaming String.init<T>(_: T)
Chris Lattner
clattner at apple.com
Sat Jun 4 13:36:37 CDT 2016
> On May 31, 2016, at 4:02 PM, Hooman Mehr via swift-evolution <swift-evolution at swift.org> wrote:
>
> This arises a different question: Should `description` always return the same value? For example: Can `description` of “May 31th, 2016” return “Today” if we evaluate it today and return “Yesterday” if we evaluate it tomorrow? Are such side-effects (using a volatile global value) permitted? Then how about localization? Can description be locale-aware without breaking the protocol?
In my opinion, no, these would be inappropriate for a “value preserving” implementation.
-Chris
More information about the swift-evolution
mailing list