On Mon, Jul 18, 2016 at 12:28 PM, Johannes Neubauer via swift-evolution < [email protected]> wrote:
> Dear Xiaodi, > > > Am 18.07.2016 um 20:55 schrieb Xiaodi Wu <[email protected]>: > > > > As mentioned earlier, NaN != NaN, demonstrating that an Equatable > instance that does not always equal itself is not "radical." Plainly, your > proposal is unworkable. > > 1. this is a basic internal type, so it can have a special behavior, since > it is a well-designed data type created by the language designers (since > there is no need to bootstrap swift from the first bits this is OK). > The problem is that this is *exactly* how Swift works. There is nothing special about e.g. Double except for the fact that it wraps a built-in type and the implementation of its operations forward to built-in functions. This is how all the stdlib types work. You can build your own refcounted COW `Array` with exactly no additional compiler support from scratch, if you want.
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
