|
Plorkyeran posted:Native support for Lists of any supported datatype is actually what I'm working on Right Now, although it'll be a while before it makes it to the Java SDK. In Realm? If so, I love you. That will clean up my data objects by a ton.
|
# ? May 16, 2017 06:39 |
|
|
# ? May 14, 2024 21:50 |
|
How is Realm actually pronounced? Is it like 'the defence of the realm', or is it more like Real-M? I've been using the former.
|
# ? May 16, 2017 10:02 |
|
Taffer posted:In Realm? If so, I love you. That will clean up my data objects by a ton. Yes. John F Bennett posted:How is Realm actually pronounced? Is it like 'the defence of the realm', or is it more like Real-M? It's the english word realm.
|
# ? May 16, 2017 15:41 |
|
https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/ Kotlin is now officially supported for Android by Google.
|
# ? May 17, 2017 20:03 |
|
Malloc Voidstar posted:https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/ Greatest thing about IO this year
|
# ? May 17, 2017 20:20 |
|
What is Kotlin going to improve with Android development? I've only recently heard of it
|
# ? May 17, 2017 21:03 |
|
Kotlin is a much better Java. There's a comparison here: https://kotlinlang.org/docs/reference/comparison-to-java.html I'd recommend just trying it out, it took me like a day to become productive in Kotlin
|
# ? May 17, 2017 21:09 |
|
So far, Kotlin looks like just another fad. Nothing particularly wrong with it, but there's nothing that stands out that screams: gotta have this now. At least the Scala fad back in 2009-2012 brought FP to the JVM.
|
# ? May 17, 2017 21:13 |
|
Volguus posted:So far, Kotlin looks like just another fad.
|
# ? May 17, 2017 21:14 |
|
I was really hoping that they would announce that Android would be written in open source swift from here on out so it'd be easier to port my apps to Android but noooooooo
|
# ? May 17, 2017 21:15 |
|
Yeah, using Kotlin mostly just makes me sad I can't use Swift instead. Don't get me wrong though, it's a great step onwards from Java, would recommend it to everybody.
|
# ? May 17, 2017 21:17 |
|
Malloc Voidstar posted:it's six years old It is. So? Scala was even older until it picked up a bit of steam. And even after 6 years, I am not aware of any other IDEs (than JetBrains) supporting this language. Not saying is bad (it isnt). It's just ... meh. Nice for a couple of personal projects for sure, but more of a curiosity, nothing else.
|
# ? May 17, 2017 21:24 |
|
The way it's written kind of reminds me of the way Swift is written at least, just more java-like instead of ObjC/C like
|
# ? May 17, 2017 21:29 |
|
Has anyone tried using Kotlin to write UiAutomator tests? I'm working on that right now and if I can get some Kotlin practince in doing that it would be good practice
|
# ? May 17, 2017 21:35 |
|
Angryhead posted:Yeah, using Kotlin mostly just makes me sad I can't use Swift instead. Can you explain why? I use both Kotlin and Swift daily and I vastly prefer Kotlin. Swift is better than Java obviously, but It's far behind Kotlin IMO. And Kotlin Native is in the works, which would potentially allow Kotlin code to be used on IOS in the future. Volguus posted:It is. So? Scala was even older until it picked up a bit of steam. And even after 6 years, I am not aware of any other IDEs (than JetBrains) supporting this language. Not saying is bad (it isnt). It's just ... meh. Nice for a couple of personal projects for sure, but more of a curiosity, nothing else. It's not a fad. It's been picking up huge steam as a Java alternative, and now with JS and Native capabilities it's expansion is accelerating. And Google officially endorsing it cements the fact that it won't be a fad. Anything that can use the JVM can be written in Kotlin, which is an absolutely enormous segment of deployed code. Jetbrains knows what they're doing, they're not going to repeat the failures of scala. Taffer fucked around with this message at 21:40 on May 17, 2017 |
# ? May 17, 2017 21:38 |
|
Taffer posted:Can you explain why? I use both Kotlin and Swift daily and I vastly prefer Kotlin. Swift is better than Java obviously, but It's far behind Kotlin IMO. What makes you prefer Kotlin over Swift?
|
# ? May 17, 2017 21:39 |
|
funny Star Wars parody posted:What makes you prefer Kotlin over Swift? Better collections. Iterating and filtering is cleaner and easier Has c-style for loops ( for(var i=0;i<num;i++) Has much better for loop / iterable syntax in general. Has ++/-- (lol @ swift removing these) Doesn't use absurd function parameter naming schemes, allowing you to include or exclude any/all of your parameter names when calling Way more concise and memorable lambda and function reference syntax. I literally have to look up how to do function references in Swift every single time i use them because they're so bizarre. when and run keywords But honestly, the biggest thing by a very huge margin is IDE support. All those things I listed are nice conveniences but none are that big of a deal. Kotlin is completely first-class in AS, and Swift in Xcode is.... not. It's actually shocking how horrendously bad Swift support in Xcode is, considering it's the language Apple is pushing so hard. It's syntax handling and autocomplete is so slow to the point of being nearly unusable, it doesn't support refactoring of any kind, and its interoperability with ObjC is sloppy at best. When compared to Kotlin/Java in AS it's complete night and day. Writing in Kotlin with AS is pure pleasure, but writing Swift in Xcode is an exercise in suffering.
|
# ? May 17, 2017 22:04 |
|
Volguus posted:It is. So? Scala was even older until it picked up a bit of steam. And even after 6 years, I am not aware of any other IDEs (than JetBrains) supporting this language. Not saying is bad (it isnt). It's just ... meh. Nice for a couple of personal projects for sure, but more of a curiosity, nothing else. This is a weird position you're taking. It sounds like you're saying it's an improvement, but...well I don't know what goes after the "but" here. Are you actually saying its worse than Java?
|
# ? May 17, 2017 22:25 |
|
I thought it was a fad and then I went to Londroid last year and everyone there was talking about Rx and Kotlin. It was just those two things everywhere. So when our hackathon came around at work two of us did a project in Kotlin. Took me about ten minutes to be convinced. The IDE support is arguably even better than for Java and the language is just beautiful. We've been thinking about starting to use it properly at work and official Google support is the last thing that was holding us back.
|
# ? May 17, 2017 22:43 |
|
Thermopyle posted:It sounds like you're saying it's an improvement, but...well I don't know what goes after the "but" here. I am not saying is an improvement, I am saying it is not bad (à la Javascript/VB levels of bad). It is meh. The features that it does bring to the table are nothing to write home about. At the end of the day, when looking at this language the only thing that's nice is the null-safety part. The rest are either no-longer relevant (java has lambdas too now) or not really that interesting (Singletons, String templates, etc.) Thermopyle posted:Are you actually saying its worse than Java? It is not worse than java, but I am not able to come up with a reason to use it over ... Groovy for example. The variable type specification doesn't do it any favors either " var name: String = ". In English one reads from left to right. "var String name" would seem appropriate, unless we're dealing with OCD developers who absolutely must have everything lined up. But, since Kotlin is not the only language out there who does that, i can't really fault them too much on it (although it is fundamental and annoying). Actually, now reading a bit more of the Kotlin documentation, it looks a lot like Groovy. Pretty much everything that groovy had can be found in Kotlin. Plus, Groovy can be used with many other IDEs, while the same cannot be said for Kotlin (as far as I know).
|
# ? May 17, 2017 23:05 |
|
They have a nice interactive tutorial / set of coding challenges for anyone who wants to see what it's about https://try.kotlinlang.org/
|
# ? May 17, 2017 23:29 |
|
If it's running using the JVM doesn't that mean it's going to have all the same issues as Java, specifically its performance compared to languages like Swift/ObjC? I'm down for easier to write Java but if it does essentially the same thing at the end of the day, I'm not sure there is much to celebrate here other than google pushing yet another shiny new thing that doesn't really change much
|
# ? May 17, 2017 23:30 |
|
funny Star Wars parody posted:If it's running using the JVM doesn't that mean it's going to have all the same issues as Java, specifically its performance compared to languages like Swift/ObjC? Or, you can look at it this way: it can use all the huge set of existing java libraries/frameworks. There's a reason why a lot of languages have been targeting the JVM in the last 10+ years or so. as for: the language doesn't really change much, I agree with you here, of course.
|
# ? May 17, 2017 23:39 |
|
Hell, even Go would be a huge performance improvement for android, though I understand the attachment to existing libraries. Pretty much any performance upgrade will require a language switch and a port of all the languages. Edit: after looking at some benchmarks I guess Go wouldn't be as good of a performance upgrade? Idk I heard it was fantastic compared to Java for serverside stuff
|
# ? May 17, 2017 23:46 |
|
funny Star Wars parody posted:If it's running using the JVM doesn't that mean it's going to have all the same issues as Java, specifically its performance compared to languages like Swift/ObjC? Language performance on frontend applications on a platform as complicated as android or iOS is not that relevant. Most apps are doing minimal processing and when they need to do a lot there's an army of threads at their beck and call, only the truly intensive applications need to care about this at all (ones doing realtime video processing or extensive rendering i.e. high-end games), and in those cases c++ is available on all platforms. Nobody obsesses over performance in Java on Android, because if they needed to obsess about performance they wouldn't be using it in the first place, and the same is true on iOS. Swift is mostly a sibling to java as far as performance goes, and if you need high performance you skip it and go straight to c++. Source: At my work we do highly resource intensive apps that require a c++ SDK on all platforms because platform languages do not provide nearly enough. More to the point though, it's not "easier to write java". It provides null safety and type inference which are the two single largest sources of exceptions in Java code literally everywhere. Null safety alone will wipe out nearly 50% of all application crashes. That is enormous. You can say that Java allows null safety with @NonNull and "if (var != null)" but that's dodging the issue because almost no one does that until after they specifically realize a object being null has caused a crash. Compilers forcing devs to do things right is a good thing, provided suitable tools are provided to easily do things write, which is one of the primary points of Kotlin. On top of that its collections and stdlibs and extension functions allow much more concise and performant code, which while not of profound importance is still a big improvement and is another thing that's more than just Java with a better syntax.
|
# ? May 18, 2017 00:34 |
|
I guess that's a fair point that I really didn't consider
|
# ? May 18, 2017 00:42 |
|
Besides, AFAIK, the JVM is widely considered to be pretty performant. I don't think anyone serious is really thinking the performance of Java or the JVM is holding back Android, but I'll admit I don't follow Android dev too closely.
|
# ? May 18, 2017 00:44 |
|
I only recently started following it after being assigned three android app dev projects at work since I'm the only one with mobile dev experience (in iOS)
|
# ? May 18, 2017 00:53 |
|
What would keep me from using Kotlin is (I'm assuming) the dearth of examples and SnackOverflow questions and blog posts about doing X in Android compared to doing the same in Java. The same thing that keeps me from using Elm (which is awesome) on web frontend projects. I'm too dumb and need lots of help.
|
# ? May 18, 2017 00:55 |
|
I feel like someone needs to mention Android code doesn't run on the JVM.
|
# ? May 18, 2017 01:03 |
|
Thermopyle posted:Besides, AFAIK, the JVM is widely considered to be pretty performant. That is a common complaint by people not intimately familiar with the Android dev situation "Java is slow, they should ditch the bad language!", but that is a relatively minor problem in the development scene. A move away from Java can provide a lot of very nice things, like null safety as mentioned above, but that's a bonus for app developers - at the system level these things are tested and annotated thoroughly enough that NPE's are not a problem. Also as you said, the JVM can be surprisingly performant given well-optimized code, but again that's not particularly important because anything performance-critical, especially at the system-level is already written in native code. A small twitter thread talking about this The bigger problem with Android development is architectural. It's a massive bloated beast with hastily-designed API's that are used as the foundation for an army of other API's, app development is all built around a god-object that is required everywhere and distasteful to everything it touches. Its core functionality was not designed to be what it is today, and as a result has blindingly glaring problems that every single developer is constantly at war with, especially around data persistence, view and data handling for configuration changes, and a painfully terrible lifecycle that governs all of this. The new system Google is working on (Fuchsia) is almost certainly being built specifically to address these concerns, building a new mobile OS that's built from the ground up with a strong understanding of what challenges it's going to need to account for. But there is good news that's nearer term, Google just released a couple of hours ago multiple frameworks specifically made to help handle lifecycle, persistence, and app architecture. And for the very first time ever (!!!!) Google has finally released opinionated app architecture guidelines, using the new libraries just released, to help alleviate these issues.
|
# ? May 18, 2017 01:10 |
|
I hope that whatever language/framework they'll choose for Fuschia (Dart?) they will have a nice and opinionated application architecture. Until then, java or kotlin it doesn't make any difference. Same poo poo just with a different color.
|
# ? May 18, 2017 01:21 |
|
Volguus posted:I hope that whatever language/framework they'll choose for Fuschia (Dart?) they will have a nice and opinionated application architecture. Until then, java or kotlin it doesn't make any difference. Same poo poo just with a different color. Good news, they finally (finally!) have opinionated application architecture with the necessary libraries to support it. https://developer.android.com/topic/libraries/architecture/index.html
|
# ? May 18, 2017 01:30 |
|
Thermopyle posted:What would keep me from using Kotlin is (I'm assuming) the dearth of examples and SnackOverflow questions and blog posts about doing X in Android compared to doing the same in Java. I realizing I'm spamming the thread at this point but this is another awesome thing about Kotlin (or to be more specific, Kotlin tooling in JetBrains IDE's). You can copy Java code from anywhere, paste it into the IDE, and it will convert it instantly to Kotlin. Any syntax differences you are unfamiliar with are no issue because they're all handled automatically. From https://medium.com/@magnus.chatt/why-you-should-totally-switch-to-kotlin-c7bbde9e10d5 (A good article) But a sad reality is that to code in Kotlin, at least for Android, you also need to be very familiar with Java because all of the API's you're building an application on top of are written in Java, so you need to know how to handle that.
|
# ? May 18, 2017 01:42 |
|
so it's just a different syntax? if so, lol @ u nerds spurtin about it
|
# ? May 18, 2017 05:44 |
|
No, it's more than that. See previous posts.
|
# ? May 18, 2017 06:07 |
|
Lutha Mahtin posted:so it's just a different syntax? if so, lol @ u nerds spurtin about it
|
# ? May 18, 2017 08:08 |
|
Lutha Mahtin posted:so it's just a different syntax?
|
# ? May 18, 2017 10:25 |
|
Lutha Mahtin posted:so it's just a different syntax? if so, lol @ u nerds spurtin about it That's what every different language boils down to.
|
# ? May 18, 2017 14:22 |
|
|
# ? May 14, 2024 21:50 |
|
Lutha Mahtin posted:so it's just a different syntax? if so, lol @ u nerds spurtin about it It's a JVM language designed to interop seamlessly with Java. It's not really that surprising that Java can be automatically converted to Kotlin. You're just going to receive Kotlin code that doesn't make use of Kotlin-specific language features. You should find out what Kotlin offers instead of just posting zingers. https://kotlinlang.org/docs/reference/comparison-to-java.html
|
# ? May 18, 2017 19:04 |