Sorry about the double post.
> On 05 Jan 2016, at 18:26, David Hart via swift-users <swift-users@swift.org>
> wrote:
>
> How is it that Swift allows code like this:
>
> struct Sneaky: StringLiteralConvertible {
> init(stringLiteral val
How is it that Swift allows code like this:
struct Sneaky: StringLiteralConvertible {
init(stringLiteral value: String) {}
init(extendedGraphemeClusterLiteral value: String) {}
init(unicodeScalarLiteral value: String) {}
}
func ~=(sneaky: Sneaky, string: String) -> Bool {
How is it that Swift allows code like this:
struct Sneaky: StringLiteralConvertible {
init(stringLiteral value: String) {}
init(extendedGraphemeClusterLiteral value: String) {}
init(unicodeScalarLiteral value: String) {}
}
func ~=(sneaky: Sneaky, string: String) -> Bool {
I imagine that during WWDC a non-negligible proportion of the Swift Open Source
contributors will be in or around San-Francisco. I’d very much like to profit
from that opportunity to meet-up, get to know each other, talk Swift over some
beers! Is anybody interested? If yes, any ideas for
I imagine that during WWDC a non-negligible proportion of the Swift Open Source
contributors will be in or around San-Francisco. I’d very much like to profit
from that opportunity to meet-up, get to know each other, talk Swift over some
beers! Is anybody interested? If yes, any ideas for
Hi all,
I have some news on the WWDC meet-up that was announced earlier this week.
Thanks to the help of a friendly community member, Bert Belder, we have been
able to secure a very cool venue!
The meetup will take place on Tuesday, June 14th at 7pm, in the IBM Bluemix
Garage, which is at
In the following piece of code, can somebody explain the last result? Why the
break in consistency? Is this a bug?
protocol P {
func foo() -> String
}
extension P {
func foo() -> String { return "P" }
}
class A : P {
func foo() -> String { return "A" }
}
class B : P {}
someOptionalCollection?.forEach { item in
}
> On 9 Feb 2017, at 22:48, Marco S Hyman via swift-users
> wrote:
>
>
>> On Feb 9, 2017, at 1:26 PM, Rick Mann via swift-users
>> wrote:
>>
>> Is there any concise way to write the following?
>>
>>
I misunderstood the release notes for Xcode 8 beta 6 I read a few days ago.
Here what will interest you:
Since ‘id’ now imports as ‘Any’ rather than ‘AnyObject’, you may see errors
where you were previously performing dynamic lookup on ‘AnyObject’. For example
in:
guard let
You can’t call arbitrary functions on AnyObject anymore. Previously, you could
do this:
let a: AnyObject = UIView()
a.hasPrefix(“test”) // This compiled (because hasPrefix(:_) exists on
NSString), but would obviously crash
This is not allowed anymore.
> On 25 Aug 2016, at 03:33, Travis Griggs
nt at all.
What was decided concerning that? I felt sure that the lookup had been
completely removed, but I’m obviously mistaken.
David.
> On 25 Aug 2016, at 09:59, Quinn The Eskimo! via swift-users
> <swift-users@swift.org> wrote:
>
>
> On 25 Aug 2016, at 08:23, David Hart vi
I’ve been bitten by that quite a few times. I’m not a fan of the new
distinction between Range and ClosedRange. I understand the reasoning behind
them, but the new model is creating more problems for me than the it solves.
David.
> On 12 Oct 2016, at 12:21, Jean-Denis Muys via swift-users
>
Dash + Alfred :)
> On 12 Oct 2016, at 17:13, Lars-Jørgen Kristiansen via swift-users
> wrote:
>
> I recommend Dash
>
>> 12. okt. 2016 kl. 17.03 skrev Adrian Zubarev via swift-users
>> >:
>>
>> You could also
I think we need a warning because it is definitely ambiguous and a common
pitfall for users of an API. The only solution would be for the APIs be written
so to avoid those ambiguities I think.
> On 5 Jan 2017, at 08:58, Rien via swift-users wrote:
>
> As you know. there
Yes, it's best to avoid concatenating strings with +. Not only for performance
reasons, but it's also less readable than string interpolation:
str += "No: \(count), HostIp: \(clientIp ?? "?") at port: \(service ?? "?")\n"
> On 23 Mar 2017, at 08:11, Rien via swift-users
> On 28 Jul 2017, at 18:55, Joe Groff <jgr...@apple.com> wrote:
>
>>
>> On Jul 28, 2017, at 12:06 AM, David Hart via swift-users
>> <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
>>
>> Hello,
>>
>> Indeed, I
> On 19 Jul 2017, at 09:22, Glen Huang via swift-users
> wrote:
>
> Thanks for the heads up.
>
> I wonder what’s the root cause of the difficulty to make "such an existential
> conform to Hashable in a general way”. Is it because objects of different
> types have
> On 19 Jul 2017, at 09:22, Glen Huang via swift-users
> wrote:
>
> Thanks for the heads up.
>
> I wonder what’s the root cause of the difficulty to make "such an existential
> conform to Hashable in a general way”. Is it because objects of different
> types have
Hello,
In Xcode 9 beta 4, Swift 4, I’m getting runtime errors popping up for
Simultaneous accesses and I think they may be false negatives. Here’s a
stripped down version of my code:
class MyButton: UIButton {
fileprivate var imageRect: CGRect = .zero
fileprivate var titleRect:
e. For example:
>
> var spacing: CGFloat {
> return imageRect.maxX
> }
>
> Without doing something like that, I don't see the same access conflicts that
> you're seeing.
>
> -Kyle
>
>> On Jul 27, 2017, at 5:04 AM, David Hart via swift-users
>
> On 23 Jun 2017, at 03:45, Jon Shier via swift-users
> wrote:
>
> I’m sorry, are you complaining about my use of Codable instead of more
> precisely referring to the JSON endcode/decode functionality based on it in
> Foundation, or are you honestly trying to say
Worth a radar to improve docs.
> On 13 Jun 2017, at 22:12, Jens Persson via swift-users
> wrote:
>
> Thanks!
>
> The documentation that Xcode displays (for CharacterSet's hasMember(inPlane
> plane:)) is as follows:
>
> Declaration:
> func hasMember(inPlane plane:
That's worrisome. type is such a common identifier that I worry its going to
break a lot of code, create some confusion and force the un-esthetic qualifying.
> On 19 May 2017, at 21:38, Slava Pestov via swift-users
> wrote:
>
> Do you have a member named ‘type’ in the
Hi everybody,
I have a 99% pure Swift 4 project (1% of Objective-C) in Xcode 9 beta 6 and the
syntax highlighting and code completion is completely broken. I’m writing here
in case it’s a Swift problem and unrelated to Xcode.
Jordan Rose suggested I run Xcode with SOURCEKIT_LOGGING=2 and here
Its slightly different though. In the case of:
let cgColor: CGColor = .clear.cgColor
clear is a static property on UIColor, not CGColor. In his example,
pythagoreanTriple is a property on Double so it does feel like a bug.
> On 1 Sep 2017, at 13:31, Adrian Zubarev via swift-users
>
Hello!
Thanks for noticing a bug and taking the time to fix it :) Here are the steps
for contributing:
Fork the project (you’ve already done that).
Clone the fork to your computer.
Branch off master and name the branch after the fix (I like to name them with
the sr number).
Write the fix and
26 matches
Mail list logo