This functionality was removed via SE-0121, back in the Swift 3 timeframe.
Saagar Jha
> On May 8, 2017, at 19:49, Zhao Xin wrote:
>
> I wonder if it has ever been allowed? I am using Xcode and it never allows
> that.
> For you specific question, you can use
>
> var
Depending on what you’re trying to do with the data, you might be better
off using an UnsafeBufferPointer and allocating and reallocating that,
C-style.
On Mon, May 8, 2017 at 7:01 PM, Philippe Hausler via swift-users <
swift-users@swift.org> wrote:
> I wonder if Data might be a better tool for
Have you try other approaches? Maybe just write your data to cache on disk
and read it back will be quicker?
Zhaoxin
On Tue, May 9, 2017 at 8:01 AM, Philippe Hausler via swift-users <
swift-users@swift.org> wrote:
> I wonder if Data might be a better tool for the job here since it is it’s
> own
I wonder if it has ever been allowed? I am using Xcode and it never allows
that.
For you specific question, you can use
var number:Int?
let result = (number ?? -1) > 0 ? 1 : 2
Zhaoxin
On Tue, May 9, 2017 at 1:39 AM, Erica Sadun via swift-users <
swift-users@swift.org> wrote:
> I believe this
I wonder if Data might be a better tool for the job here since it is it’s own
slice type and would avoid copying large amounts of data into temporary buffers.
> On May 8, 2017, at 16:47, Rick Mann via swift-users
> wrote:
>
> I have this C library that interacts with
I have this C library that interacts with some hardware over the network that
produces a ton of data. It tells me up front the maximum size the data might be
so I can allocate a buffer for it, then does a bunch of network requests
downloading that data into the buffer, then tells me when it's
Hello,
I’ve got a compiler warning from hell (actually this is XCGLogger code):
@discardableResult open func add(item: String) -> Bool {
return itemsToMatch.insert(item).inserted
}
open func add(items: S) where S.Iterator.Element == String {
for item in items {
I think you'd better define your own operator, maybe `=~` or something
else. As `==` has already meant something in enum.
Zhaoxin
On Mon, May 8, 2017 at 5:07 PM, Rien via swift-users
wrote:
> I’d love to know if there is a better way, but a ‘switch’ or 'if case' is
> the
I’d love to know if there is a better way, but a ‘switch’ or 'if case' is the
only way I know.
Regards,
Rien
Site: http://balancingrock.nl
Blog: http://swiftrien.blogspot.com
Github: http://github.com/Balancingrock
Project: http://swiftfire.nl - A server for websites build in Swift
> On
Seriously, I've been googling this for a half-hour, and I can't find an answer
(everything that comes up is for ErrorType, absolutely nothing for Error).
I have an enum:
enum MyErrors : Error
{
case one(String)
case two
case three(String)
}
let a: MyErrors = .one("foo")
let b =
10 matches
Mail list logo