Does it make sense to learn Kotlin with no prior Java experience?

Ні!
I’ve been learning how to program for for 6 months so far. I started with Python but then switched to C and found hard but quite fun to explore and work with.

By now I’m almost done with CS50, online course by Harvard University, and want to learn a new programming language. Kotlin seems attractive to me, as I want to learn how to write Android apps as well, but I’m in quandary.

The question: Would it be reasonable to start learning Kotlin now for the guy like me, or the prior knowledge of Java is the must?

Hi there!

Knowledge of Java is not a must. As I see, Kotlin borrowed something from Python and other languages, so you will not feel yourself altogether lost trying to get acquainted with it.

Also Kotlin is not Java :slight_smile: Many things in it are sensibly different.

The different thing is that learning Kotlin to more advanced, professional scale - this will require some java (perhaps advanced too) for certain. Kotlin is built upon java infrastructure so many java tools (e.g. maven / gradle, certain libraries etc) could be (and perhaps should be) naturally utilized.

You also may find that significant amount of tutorials expect of you some knowledge of java. But I believe you’ll be able to overcome it.

I think this might be the main issue with Kotlin and “rookies”. Kotlin borrows a lot, but also hides a lot and expects you to know the internals to actually understand what’s going on. At the same time if offers a lot of “shortcuts” which can help creating an easier to read code, if used correctly. But if used without any deeper understanding of why these shortcuts exist in the first place? I’m sure this could end up in a disaster :slight_smile:

So, answering the original question:

If you just tried Python and found C being too hard (C is actually considered one of the most straightforward programming languages) I’d suggest spending some more time with something more “classic”. C should be a good start I think, I started with PASCAL (but it was a long time ago :slight_smile:) and also find it a great first programming language. Then try some OOP (Java?) and after that Kotlin might be a good choice.

I would rather say that I wasn’t easy to learn C, but I managed to understand it and write the code that works well.
As far as I got it, it would be better to comprehend the OOP as such on Java and then switch to the Kotlin?

Yes, but not only OOP also other smaller things which Kotlin hides from you (because they are mostly boiler plate code, but still something that you have to know it’s there,why it’s there and how it works).

1 Like

I think it would be a good idea to learn Kotlin without learning Java first. You can think of Kotlin as an improved Java, but it is not a totally different beast. What you need to know about Java you can learn along the way. No need to worry.

actually i would start with an OOP language. i would not recommend learning C or Pascal nowadays as a first language. OOP is currently still the standard for application programming and getting Your head around the conecpts shouldnt be too hard.
and if you go in that direction kotlin is an excellent starting point. and no prior knowledge of java is neccessary. as an alternative u might try smalltalk which has an excellent syntax and is very “pure” OOP.

pls is kotlin suitable for creating gui application for windows, and with what framework?

You can use Swing or JavaFX for creating GUI applications with Kotlin. Such applications will be compatible with all major operating systems, including Windows.

The trap with kotlin is that most teaching aids target those moving from java, and on that basis continually assume a strong knowledge of java. It can be very frustrating to have concept explained in terms of java, requiring the reader to learn how the feature works in java before the instructions for kotlin make sense.

There are now online courses that teach kotlin without any prior knowledge, but these tend to be very basic, as no programming knowledge at all is assumed. The biggest ‘missing link’ is the lack of exapnations of kotlin advanced features for programmers coming from any language other than java.
We have a project that we are planning to migrate sections, or perhaps even the entire project from python to kotlin. and are finding documentation a barrier. The support material for learning kotlin is at its worst for those who have already learnt advanced programming, but do not specifically know java.

Realistically, if you do not know how to program, sadly currently the best advice is probably to learn java first. Next choice is just learn as you go with kotlin but be aware there is simple less learn to code material and much material for advanced concepts assumes java knowledge. Becoming proficient in a language other than currently may simply create significant frustration when bringing the skills learnt to kotlin, only to find the kotlin documentation specifically knowledge of each step in java a prerequisite for the kotlin documentation.

As kotlin matures, and a wide range of support emerges, the contradiction of a language that makes java redundant requiring programmers to learn java will fade to nothing.

clem951d
pls is kotlin suitable for creating gui application for windows, and with what framework?

I suggest considering tornadoFX which is a kotlin specific approach to javaFX

1 Like