> On Sep 6, 2016, at 9:39 PM, Michael Sheaver via swift-users
> wrote:
>
> I know that in some languages, if you prepend the passed parameter with a
> '$', as in $propertyName, the receiving function knows to use the contents of
> the variable named propertyName (in this case "calendar") inst
Hi Zhao,
Many thanks for your response, and I will give this a try. However, I think
that I might have used a bad example for the bigger question I was trying to
ask, and for that I am sorry.
The question that I am really trying to address here is: Is there a more
Swift-y way to, when passing
> On Sep 6, 2016, at 6:50 PM, 哀殿 via swift-users wrote:
>
> Hello Swift community,
>
> I found `__attribute__((sentinel(0,1)))` at
> https://github.com/apple/swift-clang/blob/c52d85ede49adaec457400697b1d4c1b7ea12881/test/Analysis/variadic-method-types.m#L46.
>
> But I can't imagine how differ
I am trying to understand why you are trying to do this. Can you provide a
better example for why you need to do this?
-Shawn
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
I think you messed up with `Locale` and `NSLocale`.
`Locale` is a struct in Swift 3 to replace the legacy `NSLocale`. The
latter is a class, it has an inner `structure` called `NSLocale.Key`. For
`Locale`, there is no `NSLocale.Key`. All there keys are instance
properties in `Locale`. So in your s
I am trying to build a table of current locale properties in code, and have
encountered issues with trying to pass the value of a variable to a function:
let currentLocale = Locale(identifier: "en_US")
let calendar1 = currentLocale.calendar // "gregorian (fixed)"
let propertyName = "calend
Hello Swift community,
I found `__attribute__((sentinel(0,1)))` at
https://github.com/apple/swift-clang/blob/c52d85ede49adaec457400697b1d4c1b7ea12881/test/Analysis/variadic-method-types.m#L46.
But I can't imagine how different it is from the `__attribute__((sentinel))`.
So,why we need `__att
Thanks Lou.
In addition to what Jordan and Dmitri have said, I think part of the
> confusion is that you are assuming hash values are implicitly used in an
> equality check. They are not. They are used when your instances are added
> to certain types of collections.
You are very nice. But I w
>
> My question is, apple equals banana, but their hashValues (in their own
> types) don't. What's wrong here?
Hi Zhao. In addition to what Jordan and Dmitri have said, I think part of
the confusion is that you are assuming hash values are implicitly used in
an equality check. They are not.
Reading more about Swift modules under swift/docs. I start to believe that
there's always one "main" swift module per executable, is that right?
In that case, a pure Swift program poses no issues with debugging, there's
always an "entry point" Swift module that can be specified in N_AST and
from t
As I’ve said before, this doesn’t work.
let x: Fruit = Apple(“a”, shape: .medium)
let y: Fruit = Apple(“a”, shape: .big)
print(x == y) // will print true
If you want == to behave differently for subclasses, it needs to call a method
that can be overridden. Static overloads will not produce the s
Hi,
Can somebody please help me in getting the more appropriate way of doing
Code-obfuscation.
How to obfuscate API names and pretty much everything so that once we give
build(ipa file) so nobody can extract and see which kind of API's, techniques
and methods have been used? Most affective code
> On Sep 6, 2016, at 12:38 AM, Jean-Denis Muys via swift-users
> wrote:
>
> I suppose I could make my HashableIntArray “have-a” Array, but then I
> would have to reimplement all the Array API with boilerplate code, which is
> really inelegant at best.
>
> What did I miss?
Nothing. In the cur
Hello,
I am struggling to convince Swift 3 (from Xcode 8 beta 6) to let me use an
array of Int as dictionary keys.
It doesn’t work out of the box, because an array is not hashable:
var answers: [[Int]:Bool] = [:] // error: Type [Int] does not conform to
Protocol Hashable
One way to work aroun
14 matches
Mail list logo