Can't mirrors solve this problem for Locale itself, instead of using NSLocale?
I do think that will affect performance though.
Rugen
> On 7 Sep 2016, at 09:03, Zhao Xin via swift-users
> wrote:
>
> Now I understand your point. But as Jens said, Swift is a static language, it
> won't interpre
Now I understand your point. But as Jens said, Swift is a static language,
it won't interpret `property` as a variable after `.`(dot). So for Swift
compiler, you just refer to a none-exist property.
Zhaoxin
On Wed, Sep 7, 2016 at 12:39 PM, Michael Sheaver wrote:
> Hi Zhao,
>
> Many thanks for y
> 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
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