24

swift might be coming to android

personally I think it would be awesome to have one common language for mobile development that isn't just some hack or patchjob like some other projects are

what do you guys think?

Comments
  • 7
    It'd be good to have another option. I would love to have emojis in my code.
  • 2
    that's ain't going to happen cause Google already won the infringement against Oracle. Beside that will be too much work for SDK developers to port to swift and compatibility issue. I have read on Jake Wharton's Twitter that there will be huge changes in Jdk 10
  • 3
    @rookiepatty doesn't mean it won't happen though, with swift being open sourced it's a legitimate way out of oracle's nightmare
  • 2
    @rookiepatty Probably in wake of the case but they did make some changes to the code and switched to open-jdk for some internal libraries. Doing the same again, but with swift is something they can do.
  • 0
    I doubt it, throwing away the work of almost a decade isnt happening in the near future. Java is a stable language in itself. They did a good job on creating the API and keeping it backwards compatible.

    Porting it all to Swift is a lot of work that has to be done. All current libraries would become obsolete. That is work of hundred of thousands of people.

    Personally I prefer Java over Swift. But that doesn't matter.

    What do you guys think? Would you prefer Swift? Why? Do you just hate Java in general? And why when you do so?
  • 1
    @SirWindfield think about it though, android doesn't use the JRE, it uses ART, a VM they built themselves, nothing prevents them from making another language compile to it.
    after all a language without a runtime is just meaningless text, and just like how Java libraries work in Scala, nothing would prevent ART libraries from working with the android implementation of swift
  • 1
    I would like it to happen just to annoy oracle because of the lawsuits, loads of people would stop learning java.
  • 2
    @ElectricCoffee wouldn't it than be a better choice to go with kotlin instead of Swift? That would eliminate the need of creating a new runtime that can interpret Swift code (or compile to ART)?
  • 1
    @jakej5 that is probably true. At least the part that wants to go into mobile development
  • 1
    @SirWindfield then I'd rather just go with Scala
  • 2
    Never worked with either Swift nor Scala. No idea why people hate the Java API. Some reasons would be nice so I understand the wish of a new language :)
  • 1
    @SirWindfield

    Because it is too verbose, imo. A functional approach over imperative would benefit developers greatly, hence scala. Dunno about kolin, but I do remember reading something about Google planning to use it in Android.

    @ElectricCoffee

    Scala is not an option anymore, because ART. It fucks up if it ain't standard bytecode, saying this from experience. Had switch language mid project.
  • 0
    @coookie they might lean to kotlin but there would be some steep curve in learning as it more of a functional language.
  • 0
    @rookiepatty Being functional, I think it'd be worth it. And if it allows using Java in your kotlin project, then it'd be easy to migrate and learn.
  • 0
    even with all it quirks I like Swift. it's much better than Java IMO.
  • 0
    What about Xamarin??
  • 1
    @krupal55 I believe that in Swift 3, the apparent "reliance" on Apple's Objective-C libraries for actual iOS development is supposed to look a lot different. The reality, though, is that those aren't actually the Swift language. That's like saying the Win32 API is a part of the C/C++ language.

    All that said, I just started messing around with Swift and I think it's awesome. Simple, powerful, beautiful. It's very very readable, and also very writable. I would love to see some active development on libraries and bindings for it on more platforms.
  • 0
    @Treebasher where did you get started with it? On osx/ios?
  • 0
    @SirWindfield I did, yeah. There is a fairly strong community backing the Linux port of it as well (in fact, I think Apple directly works on it as well). I can't speak to that part of it though as I haven't tried it yet.
  • 0
    @Treebasher ah ok. Would like to try it as a "normal" language without the osx/ios stuff. I fairly dislike their all creating process :)
    Gonna have to wait for it
  • 1
    Xamarin is even more proprietary than Java. Don't think I'd help much.

    I would love to have a common mobile language just to stop the React Native nonsense.

    Java's System.gc() is the main reason I don't like it.
  • 0
    @BellAppLab why System.gc()? Might explaining it?
  • 2
    @SirWindfield Well, in the context of mobile development, if you have to call System.gc(), you're doing it wrong. And being able to do so is even more wrong on a mobile device, because GC isn't cheap.
  • 1
    @BellAppLab same language doesn't mean one codebase for both iOS and android.

    What's wrong with React-Native?
  • 1
    @mihirkh I can understand it tho. Having one language for mobile development makes it a lot of easier to move from android to ios and vise versa. The only thing that you need to know is the new api for each platform.
    But I have no clue why people would move to ios. Creating the UI in pure Swift is just pain. Do not why they have no layout files like Javafx or android.
  • 2
    @SirWindfield I mean, they do have UI files called Storyboards, and a designer program for them called Interface Builder.

    xCode also has built in scene editors for when you are making games with SpriteKit.

    But again, all of that is iOS dependent because they are simply tools to the native libraries available on that platform. If someone ported Swift to Android, they would have to expose Androids UI libraries to Swift...most likely allowing you to use normal Android interface design files.
  • 0
    @Treebasher thanks for the information!
  • 1
    @mihirkh Exactly! Same language doesn't mean same code base. But that's another danger of it. People think React Native is like Cordova. Another thing is that people think React Native makes mobile development faster. Sure, if you're targeting phones only. But add rotation support and tablets to the mix and things start to get a bit complicated. React Native supporters than say "of course you can support all that with RN", but they don't realise it's going to take time. Then there's the case of making the app resilient to network failures, storing things locally and so on, which are not addressed by RN. Other people think that RN is great because you can change stuff without submitting your app for approval again. But that also means you lose all your UI when the internet goes down (see Product Hunt's app). "Oh but you can embed your code". Well, that takes time! You see... I don't really understand what the gain is.
  • 2
    ObjC's protocols are basically Java's interfaces. Swift's protocols are a move towards composition and away from inheritance, which is way cooler IMHO.
  • 0
    No, just no. Kotlin is the future.
  • 0
    Swift is too new. Ha ing enough trouble trying to build swift3 app when all respurses online are gor swift 2
Add Comment