Live data from Hacker News

Swift Ported to Android

github.com

11–20 of 153 posts

Re: Swift Ported to Android

#11
post #10

Why Android requires special support? Isn't it just linux with quite standard libc and ABI to interact with Java counterpart?

If you look at the changes, you'll see most things are pretty simple:

* CMake files are expanded to handle an Android target.

* Code that checks for specific defines or values like __FREEBSD__ || __LINUX__ now have an added condition to also check for __ANDROID__.

* Some tooling scripts to integrate adb into the Swift SDK.

* Some minor fixes elsewhere.

So, special support is a really minimal set of changes that any platform would need.

Re: Swift Ported to Android

#12
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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).

> C# benefits from the whole Microsoft ecosystem, which includes Visual Studio.

Both good and bad. Visual Studio isn't cross-platform, for example.

Re: Swift Ported to Android

#14
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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).

How much RAM does a single hello world take in C#?

How much time does it take to create a thread in mono on my Linux VM?

How much does it cost a license for Visual Studio?

Re: Swift Ported to Android

#15
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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).

[deleted]

Re: Swift Ported to Android

#16
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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).

[deleted]

Re: Swift Ported to Android

#17
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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).

[deleted]

Re: Swift Ported to Android

#18
post #2

Interesting, in the context of Xamarin acquisition by Microsoft. Swift can very well spoil C#'s steam.

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 to run faster than a VM+JIT would do and therefore longer batter management. The overhead of the runtime is a lot lower since memory is ref counted and doesn't need to run GC periodically.

Re: Swift Ported to Android

#19
post #9
post #6

Earlier quoted context omitted.

What?

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!

There is a difference between "starting a brand new app on Swift" and "porting a long-existing Apple app to Swift". How many new apps Apple had started after Swift announcement?

Re: Swift Ported to Android

#20
post #5

Interesting, but even Apple doesn't use switf on iOS. So is there really a point?

Apple doesn't use swift because they already have stable versions of their Apps written in Objective C and there's no reason to rewrite everything in swift because they can mix ObjC and Swift.
Post reply on HN