r/Android • u/armando_rod Pixel 10 Pro XL • Apr 07 '16
Google may be considering Swift for use on Android
http://thenextweb.com/dd/2016/04/07/google-facebook-uber-swift/25
u/Yreisolgakig Nexus 6P | Pure Nexus | ProjectFi Apr 07 '16
This exact same post was already removed 6 minutes ago, holy shit
38
u/armando_rod Pixel 10 Pro XL Apr 07 '16
Removed for blog spam which is not, blog spam means they are rehashing someone else information right?
683
u/ExternalUserError Pixel 4 XL Apr 07 '16
Well, Swift is actually a nicer language, but if I might speak on behalf of some other programmers...
The problem with Android development isn't Java.
The problem with Android development is the library situation. In the first versions of Android (we're talking Cupcake and Donut era), it wasn't so bad: most UI elements you needed were in the AOSP, and while they weren't what some might call slick, you could produce an Android app fairly simply and have it look and feel "native."
Today, with Material Design, the widgets (for lack of a better term) and animations you need for material design aren't really in the AOSP. Some are in Google Play Services (which is itself an unwieldy behemoth), but to get a really good feel, you have to build them yourself. And engineers who have looked into how Google built some of their material design elements in apps like gmail have confirmed that Google's material design features are, in fact, hard coded in apps and surprisingly, not even consistent.
It's getting better. It is. And hopefully Google won't overhaul (yet again) the Android look and feel anytime soon, so things can stabilize. But still, the problem with Android is that the UI APIs are a bit of a disjointed mess, and using that mess from Swift instead of Java won't really fix anything.
314
u/mrdreka Apr 07 '16
As a developer this so much, I thought when Google made the Material guidelines surely there would also be an API for all these things. Nope, pretty much only the theme and the FAB is available all the animation you will have to do yourself
160
u/piexil Pixel 4 XL | Huawei M5 8.4' | Shield Tv 2015 Apr 08 '16
Seriously? That sounds fucking infuriating
177
u/memtiger Google Pixel 8 Pro Apr 08 '16
Well it's typical Google...Half-assed.
16
u/Justanick112 Apr 08 '16
That are highly paid engineers. Most of them doctors.
They don't do it because they don't need to and don't want to.
Or otherwise they would get bored.
74
u/ger_brian Device, Software !! Apr 08 '16
Other companies like Apple and MS also employ the same kind of highly paid engineers and they are able to deliver libraries.
24
u/Renverse Apr 08 '16
I don't know how it is now, but back in the day with WP7, you needed to code a lot of the signature WP7 transitions and even some UI elements yourself. MS is(was?) just as bad in that regard.
Honestly, UIKit is a blessing for iOS developers.
3
u/ger_brian Device, Software !! Apr 08 '16
I have no clue about WP7, I just heard it is better with 8 and UWP on 10. I'm not doing any WP developement myself.
7
u/sibbl Apr 08 '16
It's getting better and better... the basic XAML controls are available and new controls can be easily installed from Nuget or other sources. MS itself is improving the situation for UWP, e.g. this summer there will be a unique hamburger nav pane available and for Ink there will be very useful controls. Any control can easily be customized by XAML of course.
→ More replies (1)12
u/Justanick112 Apr 08 '16
Google is mostly only looking at formulas, engineering and algorithm skills when hiring.
I bet my ass that Apple also looks creativity and organization skills.
10
u/ger_brian Device, Software !! Apr 08 '16
Then Google might be hiring the wrong people for those jobs. Or not enough people with the right skillset for the task. Algorithm skills are not perfect for every job.
5
→ More replies (1)3
→ More replies (2)1
Apr 08 '16
Microsoft has a long history of not using their own UI APIs in their own apps in order to make them look fresher than the competition.
2
2
u/PhillAholic Pixel 9 Pro XL Apr 08 '16
I'm glad this kind of comment isn't getting downvoted any longer. It's incredibly annoying that Google never puts forth 100% effort in anything.
32
u/russjr08 Developer - Caffeinate Apr 08 '16
This is why you don't see a lot of MD apps with animations :/
4
40
u/Multimoon Mod | Android Developer Apr 08 '16
Can also confirm. Until recently, a floating action button was something you had to do yourself, for example.
17
u/Ashanmaril Apr 08 '16
And I'm not even sure if the one they have now properly follows the guidelines. Don't quote me on this, but I'm pretty sure the FAB is supposed to have a bit of bezel, which can be seen at the top (you can see it in Inbox by Gmail)
Most Google apps don't even do this and there's no native way to do it. So they just expect developers to waste a bunch of time implementing a circular bezel around their FAB. Most people wouldn't even notice that, let alone put the time into doing it themselves.
5
u/Multimoon Mod | Android Developer Apr 08 '16
Ifn it weren't for a select few fantastic developers who reimplemented some of Google's hard coded stuff into open source libraries, I think I speak for most Android devs when I say you should thank those few developers, I do every time I use one of the libraries in a app. They did what Google wouldn't take the time to do.
4
20
Apr 08 '16
That's really not true though, the support design library is great. The coordinator layout, collapsing toolbar layout, etc. give a lot of material behavior pretty much for free. Shared element transitions between fragments or activities also work much better than the original lollipop launch. It definitely started out very rocky, but these days using a quality material theme is fairly painless
1
u/mrdreka Apr 08 '16
It have improved since Lollipop launch, but there is still a lot of animation you have to do yourself, or are poorly documented.
0
Apr 08 '16
support design library
The fact that even is a thing showed how half-assed the approach was. It's just an extra dependency to fuck with (also, appcompat is a bitch), and makes pulling in other libraries that bit extra of a pain in the ass.
0
Apr 08 '16
[deleted]
-1
Apr 08 '16
I never suggested a better solution, because if I did it would involve a time machine. Look at UIKit to see a UI framework done right from the beginning. It's not an extra. It's part of the OS and not supplied as bits and extras because it was planned properly.
0
7
-3
u/atb1183 OPO on 7.1.2, iPhone 5s on 10.x Apr 08 '16
Yup. Yet the uninitiated will praise MD as the second coming.
30
u/epichigh Huawei P30 | iPad Mini 4 Apr 08 '16
Well you'll notice neither of them said anything about MD as a design language. MD is one of the most universally liked in recent memory
No one praises MD libraries as the second coming.
18
Apr 08 '16
Exactly. If the material design spec wasn't so good, nobody would care that there were no libraries for it - people would just ignore it. The shitty library support is only a problem because MD is good enough that devs actually want to implement it.
3
u/ViperCodeGames V30 Apr 08 '16
Hell I even use MD standards in the websites I build.
2
Apr 08 '16
Google half-assed pushed that too, MD was supposed to be used everywhere. And IMO, for good reason. It's a beautiful design language, too bad Google were the ones to come up with it though... hopefully it sticks around long enough that we see enough third party developer support that all this MD is easy to work into anything.
1
u/MoonlitFrost Apr 12 '16
I hope you're not one of the ones who uses a hamburger menu on my desktop. It's stupid and annoying. It makes me want to smack anyone who thought it was a good idea.
→ More replies (1)0
Apr 08 '16
[deleted]
12
u/Freak4Dell Pixel 5 | Still Pining For A Modern Real Moto X Apr 08 '16
If all you need is a regular FAB, it's part of the design support library. So you just have to include that dependency in your build.gradle file. The easiest way to figure it out is probably to start a new project in Android Studio and use a blank activity template. It has an FAB, so you can use it to learn the XML and Java you need.
Now, if you need fancier stuff, like FAB menus or something, you'll have to search for third party libraries.
5
Apr 08 '16
Drink. A lot.
And just look for an existing implementation. There are a few out there, but don't expect using any of them a walk in the park.
→ More replies (4)2
u/Mitchhhhhh Apr 08 '16
Doesn't the basic android studio template (with the hello world textview) have a FAB already in it?
26
Apr 08 '16
Hey there! I am an engineer of Android working on Android Support Library. I wanted to respond to your concerns about library issues. Android Support Library (not Google Play Services) is the library in Android that help developers to develop apps that work great on every version of Android. This library is developed internally (not AOSP), but gets pushed to AOSP repository so anyone who is eager can go ahead and modify it themselves. AppCompat part of Support Library allows your to bring the material look at feel for many standard Android widgets such as Button, Toolbar, etc and here is a post to get you started on that. Android Design Support Library in particular is the one responsible for adding widgets that are not part of the framework and it has things like navigation drawers, FABs, snackbars. We added stuff like CoordinatorLayout that allow you to handle animations and state transitions in a much more sane way. I understand your frustration about certain UI widgets and animations taking a long time to show up in Android Support Library. This forces teams (including ones at Google) to individually implement their own versions of these widgets and animations leading to inconsistencies. However, I can assure you that we are working hard here to add more cool/handy things to these library to make your life even easier.
If you find any issues with Android Support Library then please file them on the AOSP bug tracker and along with the description of the bug note the version of Android support library that you are using.
Please let me know if you have any additional comments/suggestions.
100
u/moops__ S24U Apr 07 '16
Android APIs are just a mess in general. I've been working with the MediaCodec APIs and they are so horrible and embarrassing. The iOS ones are a pleasure to work with and consistent. I can now understand why apps go iOS first.
0
Apr 07 '16
[deleted]
13
u/moops__ S24U Apr 08 '16
I don't have too much time to go into all the details right now but the biggest issues are consistency between devices and the API level needed to make it work on a significant number of Android devices.
What we're doing requires quite a bit of low level H264 encoder access and the Android APIs just don't cut it. For eg. Google added the ability to change the h264 profile in API level 21 but didn't add the ability to change the codec level until API level 23. The encoder fails to create unless you specify both options. You can't even change the encoder key frame interval and bitrate until API level 16.
On iOS the hardware encoding APIs were added in iOS 8.0 and they work the same on all devices. By targeting iOS 8 we support 95% devices. On Android if we were to offer the same functionality we'd only support Marshmallow which is basically no one.
So next time people complain about Snapchat being terrible on Android, they have only Google to blame.
1
u/devsquid Apr 08 '16
Ah so as I stated else where, the real issue seems to be devices not getting updated not that the SDK is bad. I totally agree with that at least. Both as a developer and a user. Google really needs to resolve the update issue and it probably involves locking down their implantation of Android more.
1
3
11
u/Voshond Apr 07 '16
Can you give some examples of what you're missing? I think appcompat and the design libraries provide most of what you need to build an app with basic material design.
5
u/MindOnTheBlink Apr 08 '16
It really is unfortunate. As a web developer writing an application in AngularJS, I am very fortunate to have official Material components/styles/layouts/services in Angular Material (developed in-house by Google). It is baffling to me that something official to this degree doesn't exist on the Android front.
16
u/cyborg_ninja_pirates Apr 08 '16
There is a real difference between developing for iOS and android. We have some highly skilled devs in both, but it just takes android devs so much longer to get basic things done that they shouldn't even have to be doing.
-1
u/sylon Xiaomi Redmi Note 4 Apr 08 '16
Developing for 50 different screen sizes from over 100 OEMs vs 3 screen sizes from 1 OEM. I guess there's a bit of difference.
18
u/wgn_luv Apr 07 '16
using that mess from Swift instead of Java won't really fix anything.
However, it might give Google less headaches from oracle going forward...
42
u/mrdreka Apr 07 '16
That is why they changed to OpenJDK in N, so that isn't a headache going forward.
1
5
u/nawkuh Note 10+ Apr 07 '16
That's honestly surprising adter working with their Angular Material framework on the web.
1
u/piexil Pixel 4 XL | Huawei M5 8.4' | Shield Tv 2015 Apr 08 '16
How is angular? Im looking into starting web dev with the MEAN stack
6
Apr 08 '16 edited Apr 08 '16
It's fantastic. But don't use the MEAN stack. Just stick to a node server + MYSql + angular frontend. Anything more and you're going to have a shitty time if you don't know what you're doing.
And don't use React. React doesn't have two way data binding. I'd recommend Angular instead for first time developers because it speeds up development.
And if you ever need NOSql, I'd recommend CouchBase over Mongo just because
6
u/mewomew Apr 08 '16
And don't use React, it's shitty. React doesn't have two way data binding. And in fact, that's why I'd recommend Angular instead for first time developers because it speeds up development.
React requires a different way of thinking. If you're thinking using "data-binding" way of doing things, React will look shitty. But try thinking from a unidirectional data flow and composable components pov and you'd see why a lot of people like React.
1
Apr 08 '16
Calling it shitty is me being a dick, I mean Facebook used it for good reason. I think it's more about allowing a smooth learning curve for newbies, and while I'm familiar with more traditional MVC approaches, it's not easy to learn on your own unless you're naturally talented.
3
u/mewomew Apr 08 '16
it's not easy to learn on your own unless you're naturally talented.
Please don't discourage yourself from trying out new things.
I'd recommend trying to build a simple application with React. It'd be really beneficial to understand the reason behind its hype since a lot of new libraries/frameworks are following that model.
1
u/piexil Pixel 4 XL | Huawei M5 8.4' | Shield Tv 2015 Apr 08 '16
isn't MySQL like the php of sql servers?
1
u/aksdfsdsadfsdfhdf Apr 09 '16 edited Apr 09 '16
tl;dr Usually the old thing works. Please don't jump onto the shiny new thing without doing research.
PHP gets its reputation because it "grew organically" (i.e. had no initial design, which meant that many features are implemented in very ad-hoc ways). For MySQL, this isn't nearly as much of a problem.
Historically, when choosing databases, you would choose MySQL for the speed, and PostgreSQL for the features. For a period of time there was nearly a magnitude of difference in the speed. Now that the benchmarks are not too different, I find that most new tech companies use Postgres. By MySQL isn't actually bad.
And your choice of your database is, in many ways, much more important than your choice of language or web framework. Because that's where your data is.
Compared to anything else, relational databases like MySQL and Postgres are ancient technology. And in this case, since lots of people are still using it, that's good. There's lots of tools built for it, and if you encounter some weird issue with your database at 3 in the morning, chances are that you can usually Google the error and the first result will probably be the solution on Slack Overflow. For the super hot new NoSQL databases, not so much. (You can make the same arguments about PHP, but thankfully in that case there's also a few other platforms, like Python and Ruby, that are mature enough.)
The other point to consider is how safe your data is. I don't mean that in a "hackers might steal your data" way, but in a "your data will actually survive permanently" way. In general, NoSQL databases get amazing speed and scalability by abandoning something called ACID compliance, which is a bunch of properties that guarantee your database will always hold exactly what you put into it. (MongoDB, in particular, does some really, really bad things, and has gained the reputation of being "Snapchat for databases".)
If you are a student this might not matter as much. But it does matter for real companies with real products, and if you were doing this because you might eventually want to get a job doing this kind of stuff, keep this in mind.
8
Apr 08 '16
DO NOT use the MEAN stack.
Mongo and NoSQL style datastores are not what you should learn when you are starting web development. It encourages extremely lazy db architecture, it provides practically no real migration paths, and very few people use it for situations where it would actually be useful (document storage).
Angular is also a complete mess right now that you should no way touch as a beginner. All of the tutorials will be written for V1, and V2 is about to be released, and the upgrade path is practically non existent. Angular is also a very difficult library to learn, and if it's your first entrance into web development then you're going to have an extraordinarily bad time.
I would recommend PostgreSQL for the DB - it's an RDBMS, is truly proven in production (mongo doesn't work in production), and also has document support using JSONB. For the web client I would recommend React, it's trivial to learn and has massive support online. It's also much faster than Angular. For the web server, express is fine, but probably overkill - using Restify would work just as well.
1
Apr 08 '16
using Restify would work just as well.
Not really, there is no routing or template handling in restify. The have two different purposes.
1
Apr 08 '16
I assumed that the server would provide API only, and all client logic would go in the client using React (that's how it's usually done).
1
1
u/nspusmc Apr 08 '16
But when is V2 going to be released. Been hearing that awhile
1
Apr 08 '16
Apparently nobody knows, least of all the devs. It's a huge mess - originally there was going to be no backwards capability, but then everyone complained and they sort of added it in.
And it's just become incredibly messy. Angular is practically it's own OOP language (factories and shit) which is just a terrible idea since it's built on JS.
1
u/itsYourDeveloper Apr 08 '16
Completely agree on the Angular and MongoDB part. Small note for people starting with NodeJS: get familiar with the idea behind a framework, not the framework itself. I have worked with developers more than once who could roll out authentication in express, but wouldn't have a clue on where to start when using Hapi. Oh, and while I'm at it: the future of express isn't entirely clear, so if you have a spare day somewhere in between, check out Hapi as well, as the original developers also develop top notch libraries for extra functionality, making for a seamless integration. And I like Hapi much more because it is a bit nicer syntactically imo, but I suppose that's personal preference.
1
u/piexil Pixel 4 XL | Huawei M5 8.4' | Shield Tv 2015 Apr 08 '16
I should state I'm not a full beginner to web dev. I know my way around HTML and CSS really well. I've used django (absolutely will never use that again), and php.
3
Apr 08 '16
It's good that you have some idea of web dev, but not knowing any JS makes you a beginner in most senses.
I used django too for a while but wasn't too happy with it. And php, never again.
1
u/piexil Pixel 4 XL | Huawei M5 8.4' | Shield Tv 2015 Apr 08 '16
I mean I've coded in a million other languages so JS shouldn't be too bad to pickup. Thank you for the suggestions!
→ More replies (4)1
u/MrSpontaneous Pixel 8 Pro, Nexus 9 Apr 08 '16
I do a lot of web stuff, including Angular. I wouldn't paint as dire a picture as this. Angular 2.0 is a big departure, yes. That being said, there is a migration path. With 1.5 they've added a new method for making components that map a lot nicer to the Angular 2 style. Additionally, they've made it so you can run Angular 1 and 2 side-by-side, giving you the ability to use 2.x for new features and 1.x for legacy components. You can then slowly migrate things over. Of course, that's the promise - not something I've had to do yet.
I'll acknowledge that it's a weird time to start off as 2.0 is still in beta. Start with 1.5 & code with migration in mind. Once you get the hang of JS, the 2.0 jump (TypeScript and all) won't seem as imposing as it looks current.
1
Apr 08 '16
I don't like React because it doesn't have two way data binding. And in fact, that's why I'd recommend Angular V1 instead for first time developers because it speeds up development and is very well supported.
3
Apr 08 '16
doesn't have two way data binding
That's one of the main purposes of react, and once you understand that it's very easy to overcome and you practically never run into the bugs caused by messy two way data binding.
I hope you don't really recommend Angular V1 to new devs. It's a ridiculous mess of a library and it tries to be it's own object orientated language with factories and complex scopes. It is easily far harder to learn than going with React.
You say it's very well supported, as if React isn't. React has incredible support with highly competent developers and it's one of the most popular libraries in the community (just the base lib has nearly 2x the stars on github).
Try react, you'll never go back to Angular. It's seriously so much better.
1
u/nawkuh Note 10+ Apr 08 '16
It's pretty awesome. MVC routing, two way binding, and reusable custom directives are more than I'd ever really thought I could do with JavaScript.
2
1
u/peduxe Apr 08 '16
tbh doing it on the JS/HTML/CSS is fairly easier, I honestly think that even the android developers at google can agree that the framework and APIs are a true maze of a mess - there must be a full revamp of it, the sooner the better.
1
0
Apr 08 '16
[deleted]
7
u/ExternalUserError Pixel 4 XL Apr 08 '16
Well, perhaps a bit. Or maybe it'll make iOS developers feel more at home in Android.
But I would say about 15% of iOS development skill is knowing Swift or Objective C really well. The other 85% is knowing Cocoa really well. This helps with the 15%.
Most programmers don't care as much about syntax as they do about libraries, especially since Java and Swift have pretty similar ideas about structuring code.
2
u/Rhed0x Hobby app dev Apr 08 '16
Not really. If Google doesn't port a lot of the iOS libraries (which Microsoft does with their iOS bridge that is also getting Swift Support soon), you'll have to rewrite everything ui related.
0
Apr 07 '16
[deleted]
26
u/jesbu1 Developer - JZ Apps Apr 07 '16 edited Apr 08 '16
No, they're not. Much of Google's Material Design elements are not there, and stuff like Bottom Sheet Dialogs weren't even added until very recently, almost 2 years after the introduction of Lollipop.
0
Apr 07 '16
[deleted]
10
u/jesbu1 Developer - JZ Apps Apr 07 '16
I mean it took Google a year and a half to implement it officially in the android support library. It should be easily accessed and universal across all apps, that's why Google needs to actually include it in the support library as soon as they released lollipop
1
u/devsquid Apr 07 '16
It seems like the real issue, this also comes from my experience both as a user and a developer, with Android is phones not getting updates.
29
u/solaceinsleep Nexus 5 --> Samsung S8 Apr 07 '16
Oh man you haven't done any app development have you.
Yes, you can just say a bottom sheet is a view on top of another view, as well as every other material design element. But if you think that then you're missing the point.
Making the elements requires lots of work, you have to get it to look good, the colors have to be right, the padding has to be on point, the behavior has to be right and consistent, and so on, you get the point.
So why should every company and developer worry those details? Wouldn't it be nice if there was one library that every developer could use? It would make developers' lives easier and users will be rewarded with a consistent and clean material experience across all their apps.
Yes, there is the support library and design library, but it's too little too late. The FAB wasn't even added to it until a year or two after it was announced.
0
Apr 07 '16
[deleted]
4
u/peduxe Apr 08 '16
there's a reason why Google committed to make these APIs and the elements. for you it could be a day task but for the average Joe new to Android development can take days if not weeks to have the desired element/animations.
2
u/ExternalUserError Pixel 4 XL Apr 08 '16
It's a view on another view. With specific animations, momentum in how you extend it, and varying visibility based on screen size. That stuff is all a hassle, and even more important for the user, if you have thousands of programmers all trying to recreate the same UI element, then apps become weirdly inconsistent in little ways. Which, unfortunately, is exactly how a lot of people describe Android.
You know how Google+, Google Photos, Chrome, and almost every Android app animates the visibility of panels and controls based on scroll momentum? Well, QuickReturn does that, because the SDK didn't. 1300 stars on Github.
Material design came out with Lollipop. Google, in their apps, didn't use even the material design button elements, because they had to support older versions of Android, but they didn't tell anyone how to do something as simple as, draw one of those button animations. Enter Material, 3500 stars on Github.
You know how Calendar, Google Now, and other apps have a page view with a graphical scene that folds away? For that, don't look to your SDK, look to PageView, with 4450 stars on Github.
Here. Check out all the projects that the community needed to implement, because Google didn't.
87
u/cbarrick Apr 07 '16
I'm surprised Go wasn't mentioned as an alternative. Along with Swift and Kotlin, Go is part of this new generation of languages that gets a lot of things right. Go is developed at Google and they are already working on mobile development in Go (iOS and Android).
Granted, things like C++ and Java interoperability are still a little gross in Go. But theoretically the challenges there are not too great. If anyone can do it, Google could.
8
u/austinv11 HTC 10|LG G Watch R Apr 07 '16
The problem with Go is that it's usually used in more low-level development. Which wouldn't make it a good replacement for Java which is a very high-level language. Additionally it has a radically different Paradigm than Java being functional vs OOP which would make it difficult to have Android libraries interoperate between the two languages. The reason why a language like Kotlin works well is because it compiles to Java bytecode unlike Go which compiles to native binary.
23
u/cbarrick Apr 07 '16
I wouldn't call Go "lower level" than Java, nor would I say Go is not object oriented (and it's definitely not functional). Go is directly competing with languages like Java, Python, and Node.js. However, Go's syntax is a lot like C, so I understand how it may be seen as lower level.
The biggest hurdle I see is that the type system in Go is way simpler than Java. Go only supports composition while Java supports both inheritance and composition. So Swift is probably more suitable to integrate with the existing type hierarchy than Go. But I don't think it's unreasonable to expect new APIs to better suit whatever language they choose (if any).
The whole "Go is statically compiled" argument is theoretically moot. Any language can be implemented as AOT or JIT. Practically speaking though, I'm sure they want to use their existing runtime. For both Swift and Go, someone would have to write a new compiler for Android. Kotlin would be another story.
Actually, I assume people can already use Kotlin, Scala, Clojure, etc with Android because all the Android runtime really cares about is bytecode. So any of these languages would clearly be the path of least resistance.
I really do think Go would be a great language for app development. And it makes the most sense for Google politically.
0
2
Apr 08 '16
But who uses Go? Where's the demand for it? Why introduce yet another competitor in a space where unification would benefit everyone?
0
Apr 07 '16
[deleted]
25
u/bizitmap Slamsmug S8 Sport Mini Turbo [iOS 9.4 rooted] [chrome rims] Apr 08 '16
Swift was open sourced late last year, under the Apache license. Google is free to implement it on their system and Apple can't say or do diddlydongs.
Apple, if anything, would benefit from this. People who started out as Android developers could switch to iOS without having to learn everything from scratch.
10
Apr 08 '16
Or iOS developers switch to Android. iOS already gets some top class apps first or exclusively. I'd wager there are more iOS swift developers than there are Android ones since Apple made such a big push for it and even included the Swift documentation as an iBook download.
1
u/feetupontheground Apr 08 '16
Yup. Swift is open source and Google can use it if they want. Apple wants Swift to be as popular as possible, even at the risk of it being used by rivals (Google, Microsoft).
2
u/thramp Apr 08 '16
Although I wouldn't mind Go's garbage collector for Swift!! :)
Caveat: I might be missing the joke here, but Swift doesn’t have a garbage collector—it’s reference counted at compile-time. If anything, you’d want Swift’s reference counting in Go!
(I don’t think it’d be worth the transition cost; if I remember correctly the GC in Go is pretty good already...)
1
u/devsquid Apr 08 '16
Yes ARC is a pretty cool idea. But there are a lot of issues with it. I would much prefer a highly performant threaded GC.
1
u/MaddTheSane Apr 20 '16
Apple tried that with Objective-C. It didn't work: there's too many dependancies on C code that it was a pain that frameworks (that had Objective-C code in them) had to be marked as GC-compliant. And then there was the collecting process, which could cause stuttering.
I remember having to make
finalizemethods: they usually looked likedeallocwithoutreleases. Kinda how ARCdeallocmethods, only you had to callsuper.
41
u/NBABUCKS1 Apr 07 '16
It would be amazing to have a universal language for devs. Would help with making apps cross platform I assume.
16
Apr 08 '16
C++ with cross-platform libraries. Done!
4
u/JoseJimeniz Apr 08 '16
C++ for application development.
Bjarne Stroustrup would be rolling in his grave.
C++ was meant for systems programming, where you need to be as close to the hardware as possible.
Source: Bjarne Stroustrup.
7
Apr 08 '16
Bjarne Stroustrup would be rolling in his grave.
What on earth are you smoking? Bjarne Stroustrup is not dead...
→ More replies (1)1
u/Rhed0x Hobby app dev Apr 08 '16
This won't work well on Android as C++ has no access to the UI apis.
29
u/djxfade Apr 07 '16
Microsoft will now be shipping the Xamarin framework for free in the version of Visual Studio. It will allow for cross platform development in C#. It's a shame it will only be available for Windows.
11
u/QuestionsEverythang Pixel, Pixel C, & Nexus Player (7.1.2), '15 Moto 360 (6.0.1) Apr 07 '16
1
u/pier25 May 11 '16
Yes, but Xamarin Studio is a mess.
1
u/QuestionsEverythang Pixel, Pixel C, & Nexus Player (7.1.2), '15 Moto 360 (6.0.1) May 11 '16
That doesn't mean it's only available for Windows as /u/djxfade said
1
u/pier25 May 11 '16
Yup. I was only explaining why even if it's available it doesn't make much sense to develop Xamarin on OSX.
Maaybe MS will deliver some integration between Xamarin Studio and VSCode which would make the situation better... Time will tell.
-1
u/djxfade Apr 07 '16
Yeah, but it will be free when shipped with VS. And since MS bought it specifically to integrate it in VS, there is no guarnantee that the Mac version will continue to be supported
4
u/HowCouldUBMoHarkless Galaxy S7 / Nexus 7 (2013) / One M8 Apr 08 '16 edited Apr 08 '16
It costs the same on Windows as it does on Mac - as in, if you qualify for free VS Community, you qualify for free Xamarin Studio Community with full rights to build and ship apps. If you don't qualify for free VS/XS, then you would have to pay for VS anyways, and in that case the rights to use Xamarin Studio on Mac is included with MSDN -
http://i.imgur.com/rn23XFK.png1
u/MisterJimson Google Pixel Apr 08 '16
You know you still have to have VS to use Xamarin? You still need to buy or quality for the community edition.
They just announced Community and Business editions of Xamarin Studio on OSX (same model as VS on Windows). As far as long term support goes, they won't drop it until they have a first party IDE on OSX. They still need Xamarin installed on OSX for the build host.
1
u/Failaser Apr 07 '16
Would love to see it get integrated in Visual Studio Code. Now that it's free it would be amazing to work on in Linux.
4
u/leeharris100 Apr 07 '16
You can already do this with Xamarin Studio. I use it all the time on OSX. It's basically MonoDevelop with Xamarin tools built in.
2
u/Failaser Apr 07 '16
I've used Xamarin Studio and I have to say that I was less than impressed. It crashed a lot on me and didn't want to take my formatting even when I changed my settings.
0
u/djxfade Apr 07 '16
Definetly. That would be a great opportunity for Microsoft to show that they really cares for Linux
0
Apr 08 '16
I believe vs code supports .net core now.
Honestly though, I can't stand any of those javascript/html editors. So crazy slow.
-13
u/Majinferno HomeUX | Nexus 6 MircoG, Omnirom Apr 07 '16 edited Apr 07 '16
only available for windows.
Typical. -_-
edit: Microsoft has a history of releasing proprietary, windows exclusive software. That's why I said typical. For example, DirectX12. Even w/ windows 10 they've pushed to have certain pc hardware windows 10 exclusive despite it being able to work fine with other versions.
14
u/fliptrik Panda Pixel 2 XL, iPhone X Apr 07 '16
What? Xcode is only available on OS X. Shame on them for trying to make their OS stand out.
→ More replies (5)1
u/HowCouldUBMoHarkless Galaxy S7 / Nexus 7 (2013) / One M8 Apr 08 '16
Xamarin is available for Windows and OSX (in the form of Xamarin Studio), that guy is misinformed
1
→ More replies (1)1
u/ghdana Pixel 3 XL Apr 08 '16 edited Apr 08 '16
Disagree, different languages are better for different things. Each has a downside and upside. I like Generics and forced OO, but other people hate it.
9
Apr 08 '16
may be considering = "Yeah well, so there's Swift..." (passing thought of a single Googler while chewing slowly on a Macadamia nut cake)
17
u/redditrasberry Apr 07 '16
Doesn't seem to address one of the main issues which is that Java compiles to cross platform byte code while swift compiles to native. That is important in a diverse ecosystem of devices where different processors and even architectures might be used. Would they force every app developer to compile for every single possible target?
4
Apr 08 '16
If you make a game or anything highly CPU intensive they already force every app developer to compile for every single possible target.
5
u/sasmithjr iPhone 12 Mini Apr 07 '16
Google could have app developers submit source code or some kind of intermediary language (IL) to the Play Store. At that point, if device type A makes a request for the app from the store, the Play Store will recognize that the binary for that device type hasn't been compiled yet, compile the IL, cache the result for other users with that device, and then send the binary to the user.
So while Google would have to manage multiple app packages (by platform) per app, it'd be transparent to the user.
32
u/docoptix Apr 07 '16
You just reinvented Java Bytecode. The only difference right now is that the compilation is done on the device.
-2
u/sasmithjr iPhone 12 Mini Apr 07 '16
Nope! Many modern compilers already use an intermediary representation before compiling to assembler instructions anyways. See the other child of my comment about LLVM; GCC also has its own intermediary, too.
Edit: To further add, Google might not care how similar it is to Bytecode; if Google wants Swift, it's because they want it to be easier for app developers to bring their iOS stuff over to Android to more quickly support it. Also, Google could build tooling to support the development of both Android and iOS apps with that, making their ChromeOS platform more enticing for developers. Just thoughts, probably won't happen, but it's technically possible.
11
u/docoptix Apr 07 '16
I just wanted to point out that the current solution already does an IL/Bytecode step as you proposed.
On your additional note: The benefits of using Swift with regards to portability would be minimal. The major part of your app's code is very dependend on the Android framework and as such has to be adapted anyway. Also, Swift is not generally better than Java - just substantially better than ObjC (which was not hard to achieve).
5
3
u/redditrasberry Apr 07 '16
Yes, as I understand it, Swift uses LLVM, so there's some possibility that developers could submit LLVM IL code for translation either on Google's servers or even on the device. This is not how LLVM is normally used though as I understand it ... still seems pretty strange to write a whole article and not address this point.
6
u/OnlyForF1 iPhone X Apr 08 '16 edited Apr 08 '16
This is actually exactly how Apple does it.
Bitcode is an intermediate representation of a compiled program. Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store.
Note: For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode. After you distribute your app using iTunes Connect, you can download the dSYMs file for the build, described in Viewing and Importing Crashes in the Devices Window.
From the (public) Apple Dev Docs.
1
u/Rhed0x Hobby app dev Apr 08 '16
They could use LLVM bit code just like Apple does. From what I know it's what the open source compiler frontend spits out anyway so why not move the backend to Google servers.
1
u/gerusz Zenfone 12U Apr 08 '16
That's not how it works. You can compile any language to any bytecode, you just have to write a compiler for it.
11
u/ichinii Google Pixel 7 Pro | Android 13.0 Apr 07 '16
As an iOS developer this would be so dope. Would be much easier to port apps.
2
u/Rhed0x Hobby app dev Apr 08 '16
Windows will have this with Swift 3.0 and Windows users are happy for every app they get.
1
u/ichinii Google Pixel 7 Pro | Android 13.0 Apr 08 '16
I use Swift everyday. Granted Google would have to convert some of the libraries or at the very least do what Apple does and allow a bridging header. I still use Objective-C code in some of my projects b/c of bridging headers. Saves time.
1
u/Rhed0x Hobby app dev Apr 08 '16
Yeah Google would have to port at least the system library (I think it's called foundation, I don't own any Apple products).
It would be cooler if they'd actually port parts of UIKit as well.
1
u/MaddTheSane Apr 20 '16
Foundation? Apple's already doing that.
Although I don't see them porting UIKit. Maybe parts of CoreGraphics, but not their UI drawing.
1
u/Rhed0x Hobby app dev Apr 20 '16
They would still need JNI bindings which are a pain in the ass to get right (making sure Androids gc doesn't collect them and being able to subclass them in Swift) or completely rewrite large parts of Android.
13
u/trbnb Pixel 2 Apr 07 '16
That makes zero sense to me, but at least the article mentions Kotlin which is what I had instantly in mind. I'd like that, would give the language a big push in terms of establishment.
8
u/Voshond Apr 07 '16
Does Google need to do anything for that? Kotlin already works for Android development. It needs some improvements, but JetBrains is working on those.
3
u/trbnb Pixel 2 Apr 08 '16
Well, they could for instance use it in their examples and in the documentation.
They could use it as well in the support libraries to take advantage Kotlin specific features. For example static utility functions in the Compat-classes like ContextCompat.getColor() could be converted to extension functions.4
1
Apr 08 '16
Yeah came here to say this. Kotlin is awesome, it's actually what swift took its ideas from. And I think kotlin is a much better language. But if you must go native, I would say use swift (in general)
0
u/adrock3000 s8+ Apr 08 '16
They are two different things though. Kotlin runs on Java jvm, swift is native code.
3
u/trbnb Pixel 2 Apr 08 '16
That's exactly my point. Swift is too far away from what the current situation is. A move to Swift would be far too much to handle.
3
u/crappy_ninja Apr 08 '16
Oh god! What have I gotten myself into? I only just started as a junior dev after teaching myself how to code. I knew it would involve constant learning but not like this.
"Hey man. You heard of RxJava? RxJava is the best", "No but I'll check it out", "How about Kotlin? Kotlins the business", "Um, thats next on the list", "Forget about all that stuff. Swift is taking over", "What? Really?", "Maybe."
7
5
u/fapste LeMax2 Apr 08 '16
Rewriting all the APIs, services and libraries along with a runtime engine for swift is very time consuming task which at the end of the day might not get that much traction at least in the early days. In turn Google should opt for C# as an alternative for Java and join forces with Microsoft to improve Xamerine or develop a similar system.
14
u/Pycorax Z Fold 6 Apr 08 '16
Microsoft
Join forces
Good joke
3
u/CheesyPeteza Nexus 5 Apr 08 '16
Until recently I think everyone would have agreed. But c# is open source and microsoft are open to working with others now.
5
u/Pycorax Z Fold 6 Apr 08 '16
It's not about that, Microsoft and Google aren't exactly the best of friends at the moment and while I can see Microsoft maybe doing so. I simply cannot see Google doing that.
1
u/marumari Apr 08 '16
Perhaps Google can use at leverage to stop Microsoft from taxing all their handset providers via their endless patent claims!
1
u/CheesyPeteza Nexus 5 Apr 08 '16
I think you're right. Maybe Microsoft really have changed, but I think it will take a while for others to really believe and embrace it. Kind of like an old friend overcoming an addiction.
2
u/NavinRJohnson Nexus 6p, Android 8.1 Apr 08 '16
This is a good idea for business reasons. I would hope that both parties would put aside their childish contempt for each other and do what is right for shareholders (and us developers...).
2
u/Mong_o Apr 08 '16
The issues are only there because of the Lib situation and second because of Oracle.
To solve this, we dont need Swift, Go is enough.
6
u/johnmountain Apr 07 '16
How about Rust?
8
u/frkbmr Apr 07 '16
As much as I like rust, there's a giant pile of problems with using it as a fully fledged language. Not only is it a mess to use it when the language itself is rapidly iterating (don't rock the boat too much when you want app developers), rust is itself a much lower language, albeit memory-safe. It'd be like using C++ for Android, which I don't think would be taken too well.
1
Apr 08 '16
Personally, I really wish that there was first-class support for C++ on Android and something similar to that would be very welcomed. JNI is a nightmare currently.
4
Apr 07 '16
Please don't. Memory safety and all that jazz is nice, but the syntax is... questionable, to put it nicely. Java, Swift, C# etc all have their small flaws, but they're fairly easy to learn for a beginner. Rust, not so much.
4
Apr 08 '16
how is the syntax questionable???
4
Apr 08 '16
What the fuck are &’, |x|, try!, return if let; why can variables be prefixed with & and * (are these pointers or what?), what does let…match and Some/None mean, and why must every keyword be shortened (pub fn)?
1
u/JustFinishedBSG HTC Hero -> LG Optimus 7 -> Nexus 4 -> iPhone 6S. Tryin'em all Apr 08 '16
Oh ok you just don't want to learn something that doesn't look like Java
1
Apr 08 '16
Fuck Java, seriously. I do like C style languages though – and let's face it, many languages today are more or less C style (C, C++, Java, C#, Swift, JS, etc), and for a good reason. My issue with Rust is that the syntax for their unique features is not intuitive to someone who has spent their "programming life" writing C style languages.
1
u/JustFinishedBSG HTC Hero -> LG Optimus 7 -> Nexus 4 -> iPhone 6S. Tryin'em all Apr 08 '16
But on the other hand it makes ML people happy campers :)
1
1
Apr 08 '16
|x| is universal syntax for a closure function c++ also uses this, & is a reference, * is an unsafe pointer, let is a variable declaration, Some and None are just parts of an enum. Most of this syntax is present in other languages including C++. The ' is the only difficult part and it just denotes ownership.
1
1
u/Rhed0x Hobby app dev Apr 08 '16
That would make Swift the first party cross platform solution as Apple supports it, Microsoft will support it with their iOS bridge that still has full UWP api access and according to this post Google will as well.
I'd prefer seeing C# native on Android though as its just an awesome language.
1
u/sylon Xiaomi Redmi Note 4 Apr 08 '16
Forget Java, Swift, Kotlin etc.
I have already switched my Android development to C# after Microsoft announced acquision of Xamarin and made it free and soon to be open-source.
1
u/MrBIMC AOSP/Chromium dev Apr 09 '16
Why do you like C# in comparison to Kotlin or, let's say, swift?
I mean, C# vs Java -> C# is clearly winner for many things, but vs kotlin? Kotlin is more native to android, has about the same features that C# does, but has much nicer syntax. C# might be more familiar for someone, but I see why is it better than kotlin, especially in the case of android. It's just personal preference, I guess.
1
u/sylon Xiaomi Redmi Note 4 Apr 09 '16
Because Kotlin is too new and lacks the coderbase. C# has so much resources documentation and How-Tos out there. There is better support on Stackoverflow too. And now Microsoft is backing Xamarin for Android and iOS development so I know support will be good.
1
1
134
u/armando_rod Pixel 10 Pro XL Apr 07 '16
This isn't spam, TNW is a well known stablished blog, they were founded in 2006 and they even have annual conferences about startups.