
Swift 5 Release Notes for Xcode 10.2 - jaynagpaul
https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes/swift_5_release_notes_for_xcode_10_2?language=objc
======
dlivingston
Very cool. App thinning seems to be the golden feature of Swift 5. I am dying
for the day (if it ever comes) that UIKit and SpriteKit work natively with
Linux and Windows frameworks, so that I can finally make Swift a daily driver.

~~~
zapzupnz
Yeah, UIKit and SpriteKit will never come to other platforms. They constitute
part of iOS' and macOS' competitive advantage.

Swift's progress also has little to bear on that front as UIKit and SpriteKit
are written in C, Objective-C, and C++; their use in Swift depends on Apple's
Objective-C runtime which is _not_ released as part of the non-macOS/iOS port
of Swift for Linux.

~~~
saagarjha
To be fair, libobjc _is_ open-source:
[https://opensource.apple.com/source/objc4/objc4-750.1/](https://opensource.apple.com/source/objc4/objc4-750.1/)

~~~
pjmlp
That is a very tiny part of Objective-C story.

~~~
zapzupnz
Indeed. I don't think Apple would open source Foundation, App Kit, UI Kit, and
a bunch of other things; that by itself precludes inclusion with Swift. Aside
from that, a lot of those things rely on the full version of Core Foundation
in C; I think the (open source, non-Swift) implementation of Core Foundation,
CF Lite, is heavily reduced compared to what ships with Apple's OSs and would
make an ineffective base for redundantly reimplementing those frameworks on
other systems.

------
kitsunesoba
Migrated a substantial project today and other than updating a pod and fixing
a few warnings it’s been smooth sailing. Probably my smoothest swift migration
yet. Won’t be surprised if Swift 6 breaks almost nothing!

------
make3
"Unqualified references to Result in any of your code that imports the Foo
module will resolve to Foo.Result" That feels like it potentially can have
weird unintended consequences

~~~
saagarjha
This was done so Swift’s Result doesn’t conflict with your library’s hand-
rolled Result.

------
liquidise
As someone who hasn't yet put in the time with swift, i get the sense that
every version release of Swift includes a surprising amount of breaking
changes. Are these edge cases that don't really effect anyone or does every
Swift project you undertake basically cement itself into a swift version?

~~~
saagarjha
Swift has largely stopped making source-breaking changes.

------
theredbox
It is a shame this language does not get any momentum besides the Apple
ecosystem.

------
make3
Swift matrix use looks pretty gross compared to Julia, R or Python (NumPy)
[https://developer.apple.com/documentation/accelerate/simd/wo...](https://developer.apple.com/documentation/accelerate/simd/working_with_matrices)
Is there an other way?

~~~
stephencanon
That's not Swift matrices. Swift hasn't defined a language-level numeric
matrix type. That's a C library type imported into Swift.

You can alternatively import Python and use NumPy directly, as well as any
other C library, or you can define numeric operations in Swift. (On the other
hand, if you are using fixed-size 3x3 or 4x4 matrices, the simd_floatNxN types
deliver vastly better performance than NumPy can. So it depends on what your
goals are.)

~~~
make3
the point of using swift is to be faster than Python. if your computations are
using numpy and most of your time is spent in these computations, passing
through the python interpreter every time, it's going to have performance
similar Python

~~~
zapzupnz
> the point of using swift is to be faster than Python

There are plenty of other compelling reasons to prefer Swift over Python such
as its type system or its easy, somewhat native, integration with existing
Swift, Objective-C, and C frameworks available for macOS, iOS, watchOS, and
tvOS.

Speed isn't the only driver, and I'm sure not it's not "the [only] point".

~~~
make3
no I meant for data science applications specifically, sorry

