Is Kotlin good as my first "real" Language?

On long term? Kotlin/Nat crunches the numbers quicker, each “crunch” is about 6-7 hours of raw processing.

A plenty of languages teach you bad habits. Pick one that is the least hassle to port wherever you want it to be used at. Kotlin is a very nice one, running on a lot of platforms. It’s not the “best”, but the “best” require a lot of work which you might not even want hear about.

I would argue that most (modern) high-level languages are suitable as a first language. You’ll pick up different languages anyway, depending on what’s best for the task at hand.

Specifically, it’s useful to have (at least) one general purpose and one scripting language in your skillset. Kotlin can certainly serve as the former, but is probably not (yet?) a prudent choice for the latter.

(People will tell you about kscript, which is nice – but imho, the dice have not yet fallen regarding whether that’s a hammer-nail thing or actually superior to just using a “real” scripting language.)

Honestly I think Java is still a great teaching language. Everything is explicit, which while annoying for “real” development, is exactly what you want for learning.

Kotlin has too much magic going on behind the scenes to be a teaching language IMO.

Definitely. Its easy to get stuck in with small scripts that are useful but don’t require first creating a project etc. You can even start learning without installing anything just by going to https://play.kotlinlang.org.

It’s easy enough to write Javlin or Kotva.

I like Kotlin. Its a good start.
But, its a small library and heavily dependent on the Java library.
Also, the server side is dependent on the JVM which, basically has 2 global offerings from Oracle…one OpenJDK version and one which is now based on Java 11 which very unfortunately is turning into a subscription model.

I like Kotlin a lot. So why not as a first programming language, but with the proviso that the realities of its infancy and dependency on the Java platform, at least for the time being, be taken into account.

I for one would really love a Kotlin project that creates a Kotlin based JVM…or/and a project that would expand the Kotlin library offering away from Java…easier said than done, given the head start.
Java is far from perfect…god knows I know.

C is a very good programming language.
C++ much more complicated and I never got along with it.

You’re surely not suggesting C as a good language for begginers?

I would suggesting starting with a scripting language to avoid having to set up a complicated environment. So for JVM that would be Kotlin or Groovy (mostly because it comes bundled with Grapes, which makes dependency management for scripts very easy). If we’re speaking more generally I’d add Ruby to that list as a good scripting language to know - I often use it to create simple tools to make my life easier.

That’s by design, and actually a boon: unlike many other new languages, Kotlin has a whole ecosystem behind it.

There are many more JVM builds to choose from, see e.g. here.

Thanks Reitzig.1
For sure, I am not a proponent of one language against another.

Kotlin’s dependence on other languages, maybe a boon for you, but
not commercially a good thing.
If tomorrow, I migrate to Kotlin, and my code is heavily dependent on
the Java libraries, and the OpenJDK is not an optional for most commercial companies,
then I am forever and a day tied to Oracle, which are taking Java into unchartered waters commercially.

I dont care per se about Java. Actually I think Java is pretty poor, but from as a delivery manager
if I have 100+ VMs running my application base, I need to have a solid incentive to move
to Kotlin.
If moving to Kotlin will mean I have to really dance to Oracle’s tune because of Java, or another
library, i might as well stick with THAT library rather than confuse the issue further.
It is about risk management for commercial applications that are on the critical path for an enterprise vs
the promise of Kotlin.

Again, I am talking about basing the release-base of multi-million dollar/euro operations…i absolutely dont
give a hoot if Kotlin has better NPE capabilities.

I understand this has veered away from the original question, but so is the nature of these posts.

What I would have liked is for Kotlin to be rich enough, so that IF our organization chooses to include say the
Java lib, then we have the Option of doing so on the server side.
And to boot, to run on a JVM that is commercially supported, and is not Oracle…preferably from the Kotlin guys themeselves.

I am not sure I understand a thing about HotSpot JDK and Oracle. Why one can’t use OpenJDK or Azul (they provide commercial support). Most of compilers and runtime platforms come without any warranty at all, so how is it better?

Thanks for your post.
Posting and receiving feedback is the only way to learn.

What I would say based on my experiences of Oracle over the past 25 years is this:
one way or another, they are going to make the OpenJDK irrelevant.
Every avenue for another organization to reap their investment of buying Sun Mirco. and Java is going to be over time and subtly closed.

Unless, a big hitter is going to step in and take OpenJDK and support it properly.
Azul et. al. will still rely on Oracle.

Commercially the risk is too high and the costs are concomitant with Oracle.

I heard on the grapevine that Amazon might be stepping in to provide commercial support for OpenJDK.

I reiterate, for me, is to understand all the options.
I am not a bible basher…I simply want to understand the landscape, and where it is going to make the best commercial and risk averse decision for the enterprise.

Amazon and the JDK:

Azul as a comparison to the above:

I think “hiding too much mechanism” is a bit overstated. Suppose you are using Java as your teaching language. Will you teach students how long operations work on 32-bit machines? When will you teach students about heap memory and stack memory? Will you teach students the problem with cyclic object references? To take it further, will you teach how bytecode JIT happens, or how the CPU optimizes branch prediction, etc.?
Maybe you will, but not in the beginning. The same goes with Kotlin. It really depends how much you expect to teach. But there is no need to overcomplicate everything on day one. At least teaching Kotlin is better than telling students “Hey just copy this class Main { and public static void and String[] args and System.out, but don’t ask why”. Programmers should know what’s happening behind the scenes, but it does not have to be in the beginning by writing everything up.

A big difference for learning in Kotlin vs Java is that Kotlin a lot of what you need to do in Java is an implementation detail in Kotlin. In all cases do you need to understand the semantics of what you do, but you don’t want to learn (or teach) the implementation details untill the details become a leaking abstraction. One thing I can tell you is that beginners really don’t get the static thing. They already struggle enough with objects as they are.

In all depends on what you want to teach.