[swift-evolution] Representation of natural numbers with a distinct type
dturnbull at gmail.com
Thu Feb 4 11:46:52 CST 2016
On Thu, Feb 4, 2016 at 3:48 AM, James Froggatt <conductator at ntlworld.com>
> CGSize represents vectors *and* sizes? And an explicit ‘normalisation’ (a
> non-negative safety check) must be performed to work with CGSize as a size?
> This sounds awfully like a lack of type safety.
That's an invariant. Enforcing y>=x with a type system is just as hard as
the halting problem.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution