'Default' implementation in protocol extension is used as fail safe. You should
not consider it like something super class does. If you want it that way, use
class inheritance instead.
Zhaoxin
Get Outlook for iOS
_
From: Rick Mann via swift-users
Sen
In your opinion, `baseURL` is a factor more important than `path`. I can not
unaccept your answer. But I want to know why? Is there a standard on URL
equality?
ZhaoXin
Get Outlook for iOS
_
From: Greg Parker
Sent: 星期六, 十月 15, 2016 05:40
Subject: Re
I don't think it will be in the near future. I have not used it yet. Does it
support Objective-C cross compiling? If it supports Swift only, it may not be
designed to do that.
Zhaoxin
Get Outlook for iOS
On Wed, Sep 21, 2016 at 9:24 AM +0800, "Leo" wrote:
I don't think you could. According to the release note of Xcode 8, Swift
Package Manager can only be used in macOS command line.
Zhaoxin
Get Outlook for iOS
On Wed, Sep 21, 2016 at 12:12 AM +0800, "Leo SHI via swift-users"
wrote:
Hi guys,
I started to use SPM after installing Xco
It is suggested to put ... part at the end.
Zhaoxin
Get Outlook for iOS
On Mon, Aug 29, 2016 at 1:19 PM +0800, "Jin Wang via swift-users"
wrote:
Hey guys,
Can anyone tell me how you handle the following scenario after SE-0111 gets
implemented?
let output: (_ items: Any..., _ separ
But the beginning of AM/PM is 12, and the end is 11, which is odd to me. I now
think the model as a real clock on the wall which use Rome numbers, there are
III, VI, IX and XII. So definetly there is no zero hour on the clock. Thanks
all.
Zhaoxin
Get Outlook for iOS
On Mon, Aug 29, 2016 at
go to swift.org
Zhaoxin
Get Outlook for iOS
On Mon, Aug 1, 2016 at 7:16 PM +0800, "Adrian Brink via swift-users"
wrote:
Hi,
on the github repo for swift (https://github.com/apple/swift) it says that many
of the docs are out-of-date.
Is there a community effort to fix that, because
Your conclusion is the same as mine and you disagree with what I said? :/
mine:
> Swift forces you to use class name to alert you on the fact that static
> variables and methods (may) affect the other instances of the class as
> static variables are shared between instances. That does make sense.
16, at 6:47 PM, zh ao via swift-users
> wrote:
>
> You should be aware of using static methods as it may change static
> variables, which affects all instances of that class. Normally I think
> static methods is designed to use outside the class instance, if you have
> to us
Swift has its own suggested patterns on calling methods. For example, it
suggests you calling instance methods directly inside class. It also forces
you calling self.method() in closure that without @noescape. As well as the
static method with the class name in your question. Those are different
fr
Just a choice made by the language designers to distinguish the call at the
call site.
You should be aware of using static methods as it may change static
variables, which affects all instances of that class. Normally I think
static methods is designed to use outside the class instance, if you hav
Not with current Swift 3. Currently, the developing team make efforts on
releasing Swift 3 together with iOS 10 and macOS 10.12 in September.
The primary goal of this release is to solidify and mature the Swift
language and development experience. While source breaking changes to the
language have
You need to wait until they are promised to work with 2.3 or 3.0. If you
can get the source code, you can use migration tool and compile the
framework yourself.
Zhaoxin
On Mon, Jun 27, 2016 at 6:29 PM, Ted Bradley via swift-users <
swift-users@swift.org> wrote:
> Ah, I wasn’t being clear :)
>
>
I don't know which frameworks you talking about. The Foundation framework
is definitely different. But Cocoa and Cocoa Touch should be the same.
Zhaoxin
On Mon, Jun 27, 2016 at 6:04 PM, Ted Bradley via swift-users <
swift-users@swift.org> wrote:
> Can Swift 2.3 frameworks be used with a Swift 3
I think it avoids the confusion. You can use print((0xabc).beef) instead.
Zhaoxin
On Sun, Jun 26, 2016 at 3:50 PM, Toni Suter via swift-users <
swift-users@swift.org> wrote:
> Hi,
>
> I have a question regarding hexadecimal floating-point literals. According
> to the Lexical Structure (
> https:
e
num should be case-sensitive. If you find it otherwise, you should file a
bug.
Zhaoxin
On Wed, Jun 22, 2016 at 5:48 AM, Stéphane Lizeray
wrote:
> Hello,
>
> The following enum
>
> enum X {
>
> case A_B
>
>
> }
>
> is translated to:
>
> enum X {
>
> case a_b
>
>
> }
>
> which is fine.
>
> But
It probably will. In WWDC videos, it was said you can use both Swift 2.3
and 3.0 in Xcode 8. Xcode 8 will be released together with iOS 10 and macOS
10.12. Swift 2.3 is provided to those who don't want to move to Swift 3.0
rapidly.
Zhaoxin
On Mon, Jun 20, 2016 at 4:22 AM, Brent Royal-Gordon via s
Can you give more information on the function showRescale, is it function
showRescale() or showRescale(a:foo)?
Or have you tried case let x where x == #selector(showRescale):
Zhaoxin
On Fri, Jun 17, 2016 at 9:33 PM, Maury Markowitz via swift-users <
swift-users@swift.org> wrote:
> I was asked to
You should file a bug on the first sample.
Zhaoxin
On Fri, Jun 17, 2016 at 1:43 PM, Saagar Jha via swift-users <
swift-users@swift.org> wrote:
> Looks like a bug…strangely, lldb’s giving number: Int = 5678.
>
>
> On Thu, Jun 16, 2016 at 10:18 PM Martin R via swift-users <
> swift-users@swift.org
According to the latest Swift 3 docs
“As an optimization, when the argument is a value stored at a physical
address in memory, the same memory location is used both inside and outside
the function body. The optimized behavior is known as call by reference; it
satisfies all of the requirements of t
inout says it will copy into the function and copy back after the function
is finished. But the order is unknown. So I think the example,
print(acopy) // prints "[1, 2, 99]" (e.g. a let variable changed!)
i
s a bug as the value changed inside of the function, before the function
returns.
Swif
Is this a correct useage of namespace? As far as I know, there is not a
solution for namespace in Swift. Or should I say that Swift is not support
namespace?
Zhaoxin
On Wed, Jun 8, 2016 at 7:48 AM, Victor Leong via swift-users <
swift-users@swift.org> wrote:
> Hey guys,
>
> I'm starting to see p
I am a little odd about it too.
However, if you give it a try, you will get the results.
var lazyStruct = lazyTest(lazyVariable: 5, someProperty: 6)
lazyStruct.lazyVariable // 5
var anotherStruct = lazyTest(lazyVariable:nil, someProperty: 7)
anotherStruct.lazyVariable // 10
Everything wor
Thanks, Jordan.
Zhaoxin
On Thu, May 26, 2016 at 12:33 AM, Jordan Rose wrote:
>
> On May 25, 2016, at 02:11, zh ao via swift-users
> wrote:
>
> We were told that Bool can't downcast to AnyObject in Swift. However, with
> Foundation framework, we can.
>
> do {
>
We were told that Bool can't downcast to AnyObject in Swift. However, with
Foundation framework, we can.
do {
let a:Bool = true
let object:AnyObject = a as AnyObject
object.dynamicType
// __NSCFBoolean.Type
let b:Bool = object as! Bool
b // true
}
This feature work
See the code:
do {
var dictionary = Dictionary()
func update(value:T, key:String) {
dictionary.updateValue(value, forKey: key)
}
let aBool = true
let key = "testBool"
update(aBool, key: key)
// cannot invoke 'update' with an argument list of type '
artIndex internally contains a fault
> endIndex(str.endIndex, it should be its own endIndex, range.endIndex),
> which leads the issue.
>
>
> Zhaoxin
>
> On Wed, May 18, 2016 at 12:02 AM, Dmitri Gribenko
> wrote:
>
>> On Tue, May 17, 2016 at 5:46 AM, zh ao via swift-users
>>
I just make a clearer example.
do {
var str = "abcdefg"
var str1 = str + "hijklmn"
var range = str.startIndex..
wrote:
> On Tue, May 17, 2016 at 5:46 AM, zh ao via swift-users
> wrote:
> > It seams that I encountered bugs in function advancedBy
The second half on mutating is wrong. Please ignore that.
Zhaoxin
On Tue, May 17, 2016 at 8:47 PM, zh ao wrote:
> Xcode Version 7.3.1 (7D1014), swift 2.2 along with Xcode.
>
> Zhaoxin
>
> On Tue, May 17, 2016 at 8:46 PM, zh ao wrote:
>
>> It seams that I encountered bugs in function advancedBy
Xcode Version 7.3.1 (7D1014), swift 2.2 along with Xcode.
Zhaoxin
On Tue, May 17, 2016 at 8:46 PM, zh ao wrote:
> It seams that I encountered bugs in function advancedBy().
>
> //: Playground - noun: a place where people can play
>
>
> import Foundation
>
>
> do {
>
> var str = "abcdefg"
>
It seams that I encountered bugs in function advancedBy().
//: Playground - noun: a place where people can play
import Foundation
do {
var str = "abcdefg"
var range = str.startIndex.. Self
@warn_unused_result
public func advancedBy(n: Self.Distance, limit: Self) -> Self
}
Thanks for your explanation.
I still think the compiler should not be that smart, causing only itself
could understanding what is going on. It will be a nightmare.
Owen
On Tue, Apr 19, 2016 at 7:09 PM, Marco Feltmann via swift-users <
swift-users@swift.org> wrote:
> Just guessed since I try to
pr 18, 2016 at 9:49 PM, Erica Sadun wrote:
>
> On Apr 18, 2016, at 7:23 AM, zh ao via swift-users
> wrote:
>
> I do think there is something wrong here.
>
> // Xcode 7.3.1, Swift 2.2
>
> let t1: Int? = 2 // struct Int?
> let y = t1 ?? "abcdf" // error
&
I do think there is something wrong here.
// Xcode 7.3.1, Swift 2.2
let t1: Int? = 2 // struct Int?
let y = t1 ?? "abcdf" // error
let x = t1 ?? NSFont(name: "", size: 0) // x: NSObject?
for x, how could it be NSObject?, as t1 is a struct?
zhaoxin
On Mon, Apr 18, 2016 at 6:59 PM, Marco Feltman
34 matches
Mail list logo