Re: [swift-users] Problem with COW optimization

2016-09-18 Thread Dave Abrahams via swift-users
on Sun Sep 18 2016, Adrian Zubarev wrote: > Dear Swift community, > > currently I’m building a value type XML library which is baked behind > the scene with a reference type to manage graph traversing between > nodes. I also like to COW optimize the xml graph, but I run into one > single

[swift-users] Bls: what's ^ operator for

2016-09-18 Thread Mr Bee via swift-users
Forget it. Just found the answer myself on Swift ebook. It's a bitwise xor operator. And there's no power operator in Swift. Sorry. I've looked for this for hours. Why did I find the answer after I asked here? Life. :) –Mr Bee Pada Minggu, 18 September 2016 19:41, Mr Bee

Re: [swift-users] Checking whether an object is uniquely referenced, using a weak reference to it

2016-09-18 Thread Dave Abrahams via swift-users
on Tue Jun 28 2016, Jordan Rose wrote: >> On Jun 27, 2016, at 18:52, Tim Vermeulen wrote: >> >> Thanks for your reply. It didn’t clear up everything, though. The >> official documentation says "Weak references do not affect the >> result of this function.”, which suggests

[swift-users] Problem with COW optimization

2016-09-18 Thread Adrian Zubarev via swift-users
Dear Swift community, currently I’m building a value type XML library which is baked behind the scene with a reference type to manage graph traversing between nodes. I also like to COW optimize the xml graph, but I run into one single problem atm. Image this xml tree: It’s just a root

[swift-users] reading keyboard input from xcode playgroud

2016-09-18 Thread Mr Bee via swift-users
Hi all, Another question. I used to use this snippet to read keyboard input from XCode's Playground. And it used to work very well. Today, I just updated my XCode to v.8 and Swift v.3. After a little bit modification here and there due to Swift 3 incompatibility, I got this code compiled