Re: [swift-evolution] f suffix for float32 literals, h suffix for float16 literals

2017-11-03 Thread Steve Canon via swift-evolution
If/when 16b floats were added to the standard lib, you would just write: let vertexData: [Float16] = [ 1, 0, 0.5, 1 ] I should note that something like vertex coordinates is usually better modeled with a more specific type than [Float], like SCNVector4 or simd.float4 or your own type, which

Re: [swift-evolution] [Planning][Request] "constexpr" for Swift 5

2017-08-01 Thread Steve Canon via swift-evolution
Sent from my iPhone > On Jul 31, 2017, at 23:47, John McCall via swift-evolution > wrote: > > I disagree; it seems to me that a homogeneous fixed-size sequence is its own > concept, and there isn't any natural link between that concept and that of a > tuple. The elements of a tuple are inde

Re: [swift-evolution] protocol-oriented integers (take 2)

2017-01-25 Thread Steve Canon via swift-evolution
Sent from my iPhone > On Jan 25, 2017, at 1:45 PM, David Sweeris via swift-evolution > wrote: > > >> On Jan 25, 2017, at 10:03, Xiaodi Wu via swift-evolution >> wrote: >> >> Stephen Canon wrote that Arithmetic should refine >> ExpressibleByIntegerLiteral because of certain mathematical p

Re: [swift-evolution] [Proposal Draft] Literal Syntax Protocols

2016-06-29 Thread Steve Canon via swift-evolution
Semi-serious question for integer literals in particular: do we need a separate protocol at all? Are there types we want to support where integer literals should be supported, but + doesn't make sense? Where 1+1 actually isn't 2? If not, are integer literals really just part of Arithmetic? -

Re: [swift-evolution] [Review] SE-0104: Protocol-oriented integers

2016-06-22 Thread Steve Canon via swift-evolution
Sent from my iPhone > On Jun 22, 2016, at 9:32 PM, Karl via swift-evolution > wrote: > > I would like ‘floor’ and ‘ceil’ to be part of the standard library (or some > equivalent). It annoys me that I have to import Darwin/Glibc to properly > convert between standard library types. Would thi