Live data from Hacker News

Swift Ported to Android

github.com

51–60 of 153 posts

Re: Swift Ported to Android

#51
post #26

Earlier quoted context omitted.

I would expect this just to be basic Swift support including -perhaps- the Foundation library (String, Array and other "low level" functionality). I don't think this Swift port has currently any easy way to create apps with a graphical user interface using some sort of Java bridge. So compared to Xamarin, using Swift for Android apps would be pretty limited. But please correct me if I'm wrong.

Swift String, Array, etc. are not part of Foundation, they are part of the swift runtime library. They have mechanisms for converting to and from NSArray/NSString representations, though (and because of that, their internal structure is quite similar). But that mechanism is disabled in Linux (and obviously I assume Android).

That's correct-- Swift's native String/Array/etc. are part of Swift's native stdlib.

NSString/NSArray and friends (along with the bridging code to go between them and the Swift stdlib types) are part of the open-source Foundation, though. Eventually, that should be present in any reasonably complete Swift runtime environment-- it includes APIs, like networking and date/time handling, that would typically be considered essential but aren't part of Swift's stdlib.

Re: Swift Ported to Android

#52
post #21
post #9

Earlier quoted context omitted.

Wasn't a very useful comment, but what I think he/she meant was that Apple doesn't actually use Swift much in its own apps: http://appleinsider.com/articles/16/01/18/apple-making-spars... A lot of devs take this to mean Swift should be avoided for now. Edit: To be clear, I don't agree with this sentiment! Swift is awesome. Just trying to clear up the parent comment's confusion!

Swift 3 is expected later this year with a fixed ABI. Once that happens we will start to see Swift-only APIs being made available for iOS frameworks. Most of the existing apps aren't written in Swift because they predate Swift's creation. The balance will change over time.

Don't count on Swift-exclusive APIs anytime soon.

Re: Swift Ported to Android

#54
post #27

Earlier quoted context omitted.

People focus far too much on different languages. The fact that Android and iOS have very different UI libraries is usually a much bigger problem. Xamarin's big selling point is a cross platform ui library.

Lowest common denominator. Terrible for UX for everything but the most basic UI designs, sorry. Each platform requires UI work to make it really fit the platform in question.

True, but Microsoft is such an enterprise company that it fits their customer base really well (e.g. "I don't care if it's pretty, I just need an inexpensive-to-build app for my 3,000 workers that runs on either platform").

Re: Swift Ported to Android

#55
post #18

Earlier quoted context omitted.

Swift isn't a significant improvement over C#. Also, keep in mind that C# benefits from the whole Microsoft ecosystem, which includes Visual Studio. Beyond the language, what's even more important is the application model. That's where frameworks like React Native have the edge. This might change if Microsoft upgrades Xamarin.Forms into full-blown Universal Windows App support (think WPF on iOS and Android).

You might just be looking at the language from a syntax perspective. However the two are very different in the way that you compile and run them. In C# the code is translated into a custom bytecode (IR) and then the CLR is used to execute that and manage the memory through GC. In Swift's case it compiles down to native processor code instructions and can have optimisations applied ahead of time. This allows the app t…

.Net Core can compile AOT as well, and Xamarin already does that on iOS with its Mono runtime too.

Re: Swift Ported to Android

#56

Earlier quoted context omitted.

Lowest common denominator. Terrible for UX for everything but the most basic UI designs, sorry. Each platform requires UI work to make it really fit the platform in question.

True, but Microsoft is such an enterprise company that it fits their customer base really well (e.g. "I don't care if it's pretty, I just need an inexpensive-to-build app for my 3,000 workers that runs on either platform").

I get that. But I also think that companies are slowly understanding that UI and UX matters. Even in the enterprise sector.

Re: Swift Ported to Android

#57
Surprised noone mentions Kotlin. It's quite Swift-like, backed by JetBrains (Android Studio is based on their IntelliJ Idea), and 1.0 has only just been released. It has full interoperability with Java.

Given the above, I don't see much point in using Swift, unless it's one of these projects that are about proving a point (nothing wrong with that and often very interesting).

Re: Swift Ported to Android

#58
Surprised noone mentions Kotlin. It's quite Swift-like, backed by JetBrains (Android Studio is based on their IntelliJ Idea), and 1.0 has only just been released. It has full interoperability with Java.

Given the above, I don't see much point in using Swift, unless it's one of these projects that are about proving a point (nothing wrong with that and often very interesting).

Re: Swift Ported to Android

#59
post #27

Earlier quoted context omitted.

People focus far too much on different languages. The fact that Android and iOS have very different UI libraries is usually a much bigger problem. Xamarin's big selling point is a cross platform ui library.

Lowest common denominator. Terrible for UX for everything but the most basic UI designs, sorry. Each platform requires UI work to make it really fit the platform in question.

but i would say for writing business apps, this isnt really an issue

most business users would accept that their apps, look slighly ... unlike common apps on the platform

Post reply on HN