This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Peter Sommerhoff

Author
+ Follow
since Jan 23, 2019
Cows and Likes
Cows
Total received
5
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peter Sommerhoff

Congratulations to the winners and thanks everyone for your questions!

- Peter
7 months ago
Hi Jim,
Hi Sean,

I agree that Python would be a good first programming language but Kotlin is a good choice, too. A problem might be that there aren't many Kotlin resources for total beginners. @Sean: could you share which resources you meant? Were those suitable for programming beginners? Due to this lack of beginner-level tutorials, I created a Udemy course "Kotlin for Beginners" years ago so that might be a good starting point.

Personally, I think Kotlin is very much preferable to Java as a first language because you don't need as much confusing boilerplate. But in the end, I'm sure your grandson will do just fine with both. The most important thing are the concepts, and conceptually the two languages are very similar.

- Peter
7 months ago
Hi Matt,

There's no automatic converter for Groovy that I know of, only one for Java. So you'd have to manually re-implement your code in Kotlin.

- Peter
7 months ago
Hi Matt,

The book is divided into two Parts.

Part I teaches you Kotlin in depth. So it's very much relevant for whatever you want to do with Kotlin.

Part II goes through two sample Android apps so might not be as relevant, except for some concepts related to app development in general.

Honestly, I think the book is worth it for Part I alone (and the coding exercises).

- Peter
7 months ago
You're welcome Hugh, glad I could help!
7 months ago
Hi Rania,

Luckily, programming languages *generally* keep improving with time because we learn more about good language design (although there are enough bad languages being created as well).

I do hope and think that Kotlin will be a game changer in terms of gaining a lot more traction than it already has and being adopted more heavily on all platforms.

But (hopefully) it'll be challenged a few decades later by the next even better programming language. Who knows what software development and programming languages will look like then...

- Peter
7 months ago
Hi Hugh,

Sounds like you just want to generally share code between platforms, and Kotlin has the exact same goal Take a look at Kotlin Multiplatform projects, these allow you to have so-called common code that can be reused across platforms.

Kotlin Scripts are a special type of Kotlin file that are useful to test code snippets, share pieces of code, or do smaller tasks as with batch scripts. No need to use scripts for what you're trying to do.

- Peter
7 months ago
Hi Paul,

Was the switch to Kotlin primarily business related or technical ? Your answer indicates you believe it is kind of both.



I do believe it was both. Or if we assume the adoption was technically motivated, the dispute at least accelerated it.

But I'm not in the position to guess which motivation was stronger, that's above my pay grade

- Peter
7 months ago
Hi Terry,

You don't need to learn a new language ;)

However, you may be better off with it in the long run.

Here's a good high-level overview of what Kotlin offers that Java does not: https://kotlinlang.org/docs/reference/comparison-to-java.html

I also wrote an article a long time ago covering some interesting features: http://petersommerhoff.com/dev/kotlin/kotlin-for-java-devs/

- Peter
7 months ago
Hi Felipe,

Could you elaborate which incompatibilities you encountered?

Kotlin releases are backwards-compatible. All APIs that are excluded from this are marked as experimental (they reside in an experimental package), such as coroutines before Kotlin 1.3.

- Peter
7 months ago
Hi Preston,

I hadn't heard of using Go for Android dev either but looks like you can. However, I'd be careful to rely on it for long-term and/or professional projects because Google focuses on supporting Kotlin and Java for Android. For instance, it's doing a lot to provide better APIs for Kotlin at the moment. Plus, there is a lot more community effort for Kotlin and Java as well.

- Peter
7 months ago
Hi Carl,

I'd assume that it helps accelerate Kotlin's adoption. For instance, Oracle's mentality also pushed Google to promote Kotlin for Android development.

See also this thread: https://coderanch.com/t/706547/languages/Kotlin-Android-App-Development-Java

- Peter
7 months ago
Hi Paul,

Salvin already pointed you to the legal dispute Google had with Oracle so this was definitely a push for them to promote a different language.

But even so, we always keep improving. We learn about which language features work well and which don't. And we incorporate research into newer programming language to build better languages that help write better software.

So it's just natural that after so many years, Android and iOS offer newer languages (Kotlin, Swift) as alternatives to the older languages (Java, Objective C).

However, I also wouldn't say that Google is forcing Kotlin on Android, or that it forced Android Studio. They do naturally have to focus on one tool that they consider to be the future.

- Peter
7 months ago
Hi,

Kotlin is at least as platform-independent as Java. You can compile Kotlin to Java bytecode to run on the Java Virtual Machine (JVM) or Android -- and the JVM is what makes Java platform-independent.

However, on top of that, Kotlin can be transpiled to JavaScript or to native bytecode to run in the browser, on embedded systems, or iOS.

This was discussed here as well: https://coderanch.com/t/706528/languages/Kotlin-Android-App-Development-Kotlin

- Peter
7 months ago