jPrime 2026

Kotlin for Normal Brains (Without Jets), Nayden Gochev

59:30 · 03 Jun 2026 – 04 Jun 2026 · YouTube

About this talk

In this session, Nayden Gochev introduces Kotlin as a modern programming language tailored for Java developers interested in its advantages. He emphasizes that Kotlin is a cross-platform, statically typed language drawing inspiration from Java, C#, Groovy, and TypeScript, streamlining development on various platforms, including JVM, JavaScript, and iOS. Gochev shares insights into Kotlin's core features such as null safety, coroutines, and the integration with Android development via Jetpack Compose. He explains how Kotlin's growing popularity is reflected in its increasing rankings on language indices and GitHub contributions, highlighting its dual appeal for mobile development and multiplatform capabilities. Gochev also discusses the community-driven ecosystem of libraries and frameworks available for Kotlin, making it a compelling choice for contemporary software development.

Full transcript

Uh okay guys, uh I'm not super sure who how many people will join, but because we have a very strict agenda, uh we might start. So, our next speaker is going to be me. Um my name is Nayden Gochev. I'm one of the organizers. The reason why I'm doing this talk and the the reason why I'm speaker is because our speaker that was actually planned to do

a uh a talk was not able to join us and we will invite him next year for sure. But someone had to fill the gap and we as organizers, this has been always the idea if if something unexpected happens, someone of some one of us four or five or six people can jump in and make a talk. So, the talk is about Kotlin for normal brains. Keep

in mind this is a very introductory talk about Kotlin. So, it it goes somehow deep, but it starts from the beginning. Uh it's more towards beginners and it's more towards Java developers, which I I guess all of us are, that want to see what what's the buzz about Kotlin, why Kotlin is good, why Kotlin might be something that I can use and so on and so on.

So, about me, as I said, I'm one of the organizers of the JPrime. I'm one of the leaders of the Bulgarian Java User Group. I'm a Java developer. And uh in fact, I can say that I like and I love Java the most from all the languages that exist out there. Um however, because I'm doing Java for more than 20 years, I get extremely bored some years

ago. So, in 2018, I decided I should learn Dart and Flutter. Then I decided maybe I should check TypeScript just for fun. And um yeah, in 2012 I even worked for Telerik for a year and a half in C# because I'm I mean C# is just the biggest fork of Java after all. Um and I saw Kotlin 4 years ago and I jumped into projects with Kotlin

2 years ago. And I was thinking, "Ah, Kotlin seems nice. Maybe [snorts] more people should be aware of it." Uh I'm organizing a lot of events. You know about JPrime. We are also organizing JProfessionals. We are organizing the Java Beer events. And since last year I was organized one of the organizers of Data Science Conf. The next Data Science Conf will be in October about It's about

or towards data engineers. And this year we will also have two other events in October which are Full Stack Conf and AI Stack Conf. Why I'm mentioning this is that Full Stack Conf probably will have some talks about So, if you find Kotlin interesting and you want to learn more about Kotlin, you can join us there. Now, what the [ __ ] is Kotlin? This is Kotlin. At least

according to a lot of people, it's a name of a ketchup brand. Um in reality Kotlin is code on an island. Maybe you know, but it's an island, Russian island, very close to St. Petersburg. And at that time when um Kotlin was planned or the name of the Kotlin was planned, they there was this idea of calling Java languages on the name of islands. And someone decided

maybe Kotlin is a good name because the JetBrains, who are actually the creators of Kotlin, had a nice office in St. Petersburg at that time. yeah, it made sense. Now, what Kotlin is. Kotlin by definition is cross-platform statically typed general-purpose high-level programming language. with with type inference. Now, what all these things means, probably most of them you know, but not all of them. However, how I would

explain what Kotlin is, I would say Kotlin is a mix of these languages over there. So, basically, this is one of the first meetings uh with the creator of Kotlin and the former lead of Kotlin where they decided Kotlin should have basically the best or the most pragmatic features from all of these languages. So, most of the features from Java, some of the features from Google Groovy,

some nice features from C# and adding features from Scala and TypeScript. What is not very readable here is that on this diagram it also says that Kotlin should somehow compile to JVM, Kotlin should somehow compile to JavaScript, and Kotlin should somehow compile to LLVM languages. So, the idea is let's have a language that is a mix of these languages and let's have a target that is actually

basically everything, right? If you If you say at this this point is I don't know, 2010 maybe, 2011. At that point there was no WASM. So, JVM, JavaScript, and LLVM was basically almost everything. Now, there is another target which is WASM. why do you want to learn Kotlin? Now, there are multiple reasons, but one of the reasons is that Kotlin is actually becoming more and more popular.

This is the TIOBE index. I wouldn't consider TIOBE index as something real, but as you can see here, it's still visible that the graph is going up and up, right? So, uh it makes sense. Also, what is interesting here is that for 10 years since 2016, it was on 168 place and it was at some point at 15 place uh according to this index. So, kind of

a fast um getting fast getting getting popula- uh popularity fast and fast language. Now, this is the GitHub Innovation Graph, which is checking how many pushes and how many commits with particular languages are made. So, I would consider this more real data. Uh you can see that Kotlin is getting uh more and more popular. Uh you can see Java over there that is getting less popular. Um

it's maybe not very easy but uh not very seenable, but you can see that Dockerfile somehow become more popular than Java. So, I don't know who is writing Dockerfiles, but I guess a lot of people. So, yeah, you can see that Java is basically going slowly down. And Kotlin is one of the languages that's going up. Um now, before before I continue, I think everyone should have

a reason why he wants to learn a language or why he wants to expand his knowledge to uh new. And I want to share why I wanted to learn Kotlin. So, my idea of learning Kotlin was this write once runs everywhere, right? Uh or anywhere. So, Kotlin is kind of this world dream of Java that we had where we can write one single application in Java and

it works everywhere. And this was the case before the mobile stuff, right? When iPhone and iOS was released, virtual machines and just-in-time compilers were or were not allowed on the Apple uh hardware on the Apple phones. And basically, this kind of killed the whole Java write once runs And now, it's not very easy to write mobile applications for iOS in Java. However, with Kotlin, it's not exactly

like that. With Kotlin, as you saw from the initial diagram where Kotlin can go to LLVM and Kotlin can go to JavaScript and Kotlin can go to JVM, this means that, first of all, you can use Kotlin everywhere that you can use Java because it goes to JVM. Second of all, you can use Kotlin towards JavaScript, which means you can have a web interface and this web

interface can be accessible from everywhere. And also, Kotlin goes to LLVM, which means, basically, Kotlin can help you build applications for macOS and iOS and they and they are indistinguishable from Swift or Objective-C applications. now, what and how Kotlin works is a bit different depending depending on the platform that you want to target. Now, the best use case and the best experience as a developer that you

can get is on the JVM. I'm saying saying that not because I'm Java developer and not because I like JVM, it's just the best. If you start writing Kotlin and if you start learning Kotlin, I will suggest try on the JVM first. What are the features if you try on the JVM? You have everything in Java. This means there is no new standard developers kit that you

have to learn. Right? If you want to learn or write JavaScript or Dart or whatever, you have to learn new set of classes. You have to uh methods. While with Kotlin, you know how to use BufferedReader, you just use BufferedReader. You know how to use PrintWriter, you just use PrintWriter. So, you don't have to learn any of the any new class that Kotlin provides. So, what Kotlin

gives you, of course, it gives you the new language and on top of the new language, it gives you a new standard standard library, which is more or less extension methods. So, what it gives you, you know, all the integers to have a method to string, all the strings to have a method to int, and so on and so on. So, it gives you just a more

pleasant experience using the language, but it's it's not completely new. Also, it gives you a Kotlin X, which is Kotlin extensions, where Kotlin is trying to add stuff or add libraries that are optional, and they can work on the JVM or in other targets without code changes. What this means, it can have coroutines that are similar to go routines, and so on and so on. So, it

has features on top, and on top of that, these features can also be used in other targets. So, if you are targeting JavaScript or if you are targeting LLVM or whatever, these features will work. now, Kotlin has became popular not because of JetBrains and not because it's better Java, but because Google decided that they want to switch to Kotlin, maybe because they were pressured by Oracle, you

know, all these lawsuits and so on, and they needed the new language, and by giving them a language where everything from Java just works, Kotlin was a no-brainer, right? It's it's very easy to mix and add to existing applications. You can mix inside the same application Java code and Kotlin code. You can basically add new packages and new classes in Kotlin, and you can mix them together,

and it makes sense for Google and for Android because Google um created a new UI framework that is called Jetpack Compose that is super popular because if you ever wrote an application for Android, you know that all the UI is written in these XML files, and XML files are super old-school. The new way is to have some DSL where you can build a component tree or JSX

in case of React, which is basically just an alternative, but still builds a component tree, and you can see like you can read visually how the whole UI will look like. And Jetpack Compose is such a framework, it's amazing, it's great. Uh and it's super popular. I think somewhere I somewhere I saw that 60% of Android developers are using Jetpack Compose and 92% since this this year

of professional Android developers are using Kotlin as primary language. So, this means that even for old applications that use the old XML views, they also switched to Kotlin. So, yeah. And Kotlin gives you one big advantage, and this is this multiplatform development. So, this multiplatform development means that if you have a Kotlin application that is written especially in Jetpack Compose, you can just ship this application on

LLVM for macOS and iOS, and you can just ship this application on JavaScript and on WASM, and even if you do not use Jetpack Compose, even if you use the old XML views, at least you can just compile all of your business logic and just create a new specific UI for the specific platform. Uh as I said, Kotlin native, it's something that supports LLVMs, it supports building

for Linux, Android native development kit, and it also supports kind of Windows. Uh there is a a JavaScript compiler or it's actually a JavaScript target, um and there are a lot of amazing frameworks that have been added. Uh I will show some of them, which gives you basically a possibility to write a web web applications in and it's not only that, it it has also full-stack applications,

but it also gives you a a to kind of use any JavaScript or TypeScript library from Kotlin. So, if you say you hate Microsoft and you hate TypeScript and you don't want to use TypeScript, you can kind of use Kotlin and still use TypeScript libraries. Um and there is a Kotlin Wasm. Now, before before uh I continue, I can just share the Wasm target, and this is

very old, is not very far from the JVM as part of performance. So, what this means is that even if if you use JavaScript, it's a lot slower, sure, but if you are using Wasm, you can get basically a very close performance to the JVM. Um and as I said, Kotlin multiplatform gives you this possibility to target everything. Now, in Kotlin, you can use any Java library.

So, everything from Maven Central is available, but this is available only if you are using the JVM. If you want to use native or if you want to use Kotlin JavaScript, sure, you cannot use JVM uh libraries because they use the Java SDK. So, there is a website called Kalipsos.io from Kotlin Lips, where you can actually This is an old screenshot. Actually, now there are more than

3,500 packages, and you can find platforms Sorry, uh extensions and that work across all the platforms. So, for example, you can see here Coil. This is a very popular library, and it says it works on the Android JVM, on the JVM, on Kotlin Native, on Wasm, on JavaScript, and yeah. So, basically, it works everywhere. So, what this means is that if you are using a Kotlin multiplatform

and you are making an application that should work everywhere, safely add uh Coil or you can safely add some other library, and it will just work. Uh now, Kotlin is also used for the Kotlin notebook. So, if you do some data engineering and so on, you can basically write small Kotlin snippets that can process your CSV files, extract some data, and so on and so on. And

as I said, Kotlin is made by JetBrains. So, just briefly, I will say about the history. Why I'm saying about the history? Because some people are thinking, "Oh, Kotlin is super old." Well, Kotlin is super old. The first commit is from 2010, but actually, it has become popular in 2019 when it become the preferred language on Android. And 2019 was not that far away. Uh and if

you see, 2020 was when they added Apple platform support. So, it was like 5 years ago. It was not super far uh far ago. And you can see that in in years, they are adding new and new stuff, but usually there is like two releases per year. So, as you can see, Kotlin 1.8 and 1.9 in from 2023. So, it's very similar to what you expect from

Java, right? In Java, we also get two releases per year. Again, something else that is a bit weird that you should be aware, usually when a new language is released, this is in the zero version. So, for example, 2.3.0. This is adding some language features, and you can use these language features. Usually, there is a dot 10 version that is basically a bug fixes. There is a

dot 20, which is adding improvements on existing tooling. And usually, there is a dot 21. So, usually, every version have like these three subversions later on. Uh okay. So, is Kotlin a new beginning? As I said, no, because you can use everything from the JVM. So, how Kotlin looks? It looks like that. I don't know about you, but there are two things that I love in this

example. The first one is fun, and I think that it's a better name for function because it's just three symbols and less tokens. Right? We are all writing AI now or we ask AI to write for us. So, the tokens are important, but the most important bit is there is no Does this differ? There is no semicolon. There is no statement ending. So, because there is no

statement ending, that's why some keywords like this fun are required. Otherwise, you can only do the parser and so on. But, the the difference with JavaScript and some other languages is that this works, right? So, you don't have to put a semicolon. Like, even if you put it, it will be a warning. And the moment when you start writing Kotlin, if you try to write it by

hand, I promise you to enter the flow is far easier. Because every time when I write Java code, I'm thinking about the next statement and I'm putting enter and it it starts complaining, "I'm missing semicolon." And then I have to click command enter to auto-complete the statement and then go back and this is basically stopping my flow. In Kotlin, because there is no semicolon, it's far easier.

I I will bet that if you write Kotlin for 1 week, you will love it. So, Kotlin is kind of like Java, but it's not syntax sugar on top of Java. It's a completely different language. So, it's not Java plus plus. It's not like Groovy. If you remember Groovy, back in the days, they were saying, "Oh, you can just rename Java file to Groovy file. It will

just work." And then you can add stuff on top. Well, no, with Kotlin, it's not like that. Kotlin is a new language where most of the things that doesn't make sense have been removed and some things have been changed and some things have been added. So, the basic syntax is very basic. You know, package, import, nothing fancy. Uh you can use print line and read line. Nothing

crazy, right? Um now, in order to declare a variable, you either you val or var. Val is for read only variables, var is for mutable variables. some people don't like this. Actually, in one of the initial ideas or one of the initial proposals, it was uh proposed to use two dots and equal for mutable and just equal for immutable. Frankly, I would love that, but this was

not what was accepted, and we have val and var now. Some people say, "Well, it's very close. Why it's not final and var?" Well, because if you need to make something that has been final to be a var, you have to remove five symbols and add three symbols, and now you just have to change one symbol. Even if tokens doesn't matter, keystrokes do. Uh and if you

can see, the types are more or less less optional. So, they are inferred by the type of the uh of the value. So, for example, here we have a customers, and we have string templates built in. So, every template, there is no specific syntaxes. You can use dollar You can use this nice style that we used from JSTL, I believe, and then in Unified Expression Language, it

was a bit different with the JS, but something that we used for 20 years. And we have all the types from Java, but we also have unsigned integers. So, why these unsigned integers exist is because sometimes when you try to convert some colors, because in Java you don't have unsigned stuff, so you kind of lose some some of the values, and you have to do some hacks,

and there is no need here. And as you as you can see, if you want to specify the type of a variable, it's two dots and then the type. It seems like TypeScript. It also seems like Swift. Uh so, why this is important? Because if you're writing on Kotlin multiplatform, you can decide that your UI is in Swift, and you can decide that your UI for uh

for iOS and uh uh iOS and macOS is in and your UI for JavaScript is in TypeScript. And your business logic is in Kotlin, and when you start switching, you kind of use the same memory between all of these languages. And you can also use the same ID, and actually even debugging works, by the way. so, as I said, you can just define a variable, all the

types are with uppercase, and you don't have to specify there is a nullable types. Nullable types means that if you want something to contain a null, you have to put a question mark after the type. And if you don't put a question mark, and if you just put a variable, it will assume that it's a non-nullable. So, by default, nothing is nullable unless it's specifically nullable. Now,

when you try to access these nullable fields, you have to use the other syntax with the question mark and a dot, which means this will not trigger a null pointer exception. If if left side is null, then the whole expression is null, and you will not get null pointer ex- exceptions. Now, I do use Java daily, and I do use J Specify. And J Specify is great.

I think we have some talks about J Specify. Sure, join them. But then, it forces you to check things that you have marked as nullable in J Specify in Java. But in order to check, you have to write if this not null, if this not null, or to use objects.notNull, which will throw uh an exception. While here, it's far easier, far better, and far more readable. You

have all the collections, and for collections, important thing is that there is no collection literals. So, there are methods like listOf, and mutableListOf, and mapOf, mutableMapOf, setOf, mutableSetOf, that actually create each of them. By default, it's kind of like like in Java, like list.of or whatever. this is an example, you know, list of you just send the elements in the list. And uh for mutable list, it's

kind of the same, but um you have to use mutable list. The types, you don't have to write the types because they will be inferred. Um now, something interesting is that if you are using map, you have to use this to, which is kind of like a keyword, that says what is the what is the uh value for each key. And you can access elements in list

and maps with brackets. So, like an array or like, I think in TypeScript and some other modern languages. You can also use uh the in ex check, which checks if something is inside uh the element inside the collection. And as you can see here, orange, we have an orange somewhere, which is mapped to 100, and you can say orange in the keys, and it will return true.

If you want to check in values, you can say dot in values. And if you don't say in keys, it is by default assumed that it's in keys for the map. So, you can very uh nicely check for stuff. Um if statement is the same, you know it in Java, right? You can have an if, whatever. And this is kind of a common to have some some

variable and then some check, it doesn't matter which, to check this flag and to assign uh values to this variable. Because of that, in Kotlin, the if is an expression and not a statement. What this means is that if returns the result right away. This means that you can directly write something like that. If a b a uh greater than b, a else b, or you can

print it, or you can just assign it on the left side to a variable. So, this gives you amazing possibilities, and again, just give yourself a week, and you will love it to have everything as expression. There is no switch statement. There is trinary trinary operator with a question mark and two dots. There is a when, and when is kind of like switch on steroids. You can

have values that you want to check, and you have an else. uh also, it's also an expression, which means the left side you can assign to a variable, and then the result of the switch, or the result in the of the when will be returned as this variable. And also, you can use when without a parameter, and just make the statements inside. Sometimes it makes sense. It's

more readable than if. And in reality, in Kotlin, I almost never use if. Like, I kind of use if because I'm used to use if, but uh it doesn't make much It doesn't make the code much uh more readable. In most cases, I will just call a method, or whatever. So, yeah. Um the other thing that Kotlin have is ranges. So, you basically can write a number,

two dots, and another number, and this is equivalent to all the numbers between these two numbers. So, for example, 1.4 is 1 2 3 and 4. And if you put uh smaller than, you basically have excluded four. And you can also use things like down to, or step, and so on, and so on. So, this is uh common when you do a four. So, instead of this

crazy four that I think came from C, where you have e equals zero, e plus plus, e plus plus, or whatever, and you can even combine, and basically, you don't have You don't have to use anything else in the language. Everything can be a four. You don't need ifs, you don't need whiles, you don't need do's. Everything is four and you can you can even do a

four on multiple objects, which means the four is the crazy crazy four. Here we have a different syntax for four, so it's not the same as Java, which is more or less like that and you you if you just want to count between numbers, you just use ranges. Um again, if you have a list of stuff, you can just do a four in this list of stuff.

The while and do while are the same the same and in Java. And here is where it's getting interesting. Now, Kotlin is interesting because you can use everything that you are already familiar with from Java. You can use all of the idioms or the way how you write from Java, but also you can use functional programming like So, the functions in Kotlin are everywhere and it gives

you all the powers that Scala and other functional languages gives you. Now, some people ask why why did you why JetBrains made Kotlin and not not just made Scala and the reason is or the official reason is that they say is because Scala is the Scala evolution is a bit slower, while with Kotlin they can decide how to uh change the language and this evolution can happen

a lot faster. But basically about functions, functions in Kotlin as I said, they start with fun and you can have the type that the function returns after two dots uh and the the the bracket. Um now, invoking a functions is the same, you know it, you can just return results. with parameters, basically the parameters are after sorry, the types of the parameters are after the name of

the parameters, so kind of the same like in TypeScript. a bit hard to get used to that, but it's not that hard, and on top of that, automatically you get named arguments. So, what named arguments means is that define your function with few parameters, because you have to provide the name for these parameters, when you invoke the function, you can actually pass the name of the parameter

when you pass the arguments, right? Which means if you want, you can pass them in a different order, and so on and so on. And also, it's visible, you know, this uh code smell that is very often when you like pass a boolean to your method, and it just sees true and false, and no one knows what this true and false is, you have to open the

method to understand what this is. Well, in this case, you can just pass the name of the parameter up front, and you know that this true and false is because of I don't know, recurring, for example. Um you can also have a default values when you define the parameter like this prefix. If there is no prefix, you can say equals to info, which means if it's not

passed, you will get this Uh and of course, this kind of leads to this bad experience where functions have more than seven and eight parameters. Do you know why we should not create functions with more than seven parameters? Anyone? Like usually, we should we have a hard stop on seven or or eight. That like everywhere. It's not only in development. It's The reason is because everything up

till now is made for humans, and it's actually proven that we as a humans, our brain is bad. Ha. So, basically, we can we can save seven things, and when we go above eight, we kind of start to forgetting the first ones. So, when you when we start reading like parameters and we are on the ninth position, we already forgot what were the previous positions. And also

proven that if you do a even a simple calculations 4 4 + 4 or if you do 4 + 9, 4 + 9 takes twice the time because you have the stupid buffer of up to seven in your brain and it takes double calculation basically. So, that's why you have this rule, but in Kotlin because you you have named parameters and many of the parameters can have

a default value and at the end you come up with some methods that have 15 parameters, which is not great and even JetBrains do that, but that's the way it is. At least the ID helps. Uh if you do not return any type, you return a type that is called unit. It's not void. I don't know why it has ever been called void because when you call

the method, it's not like it didn't did anything, right? It just it did something, otherwise why you going to call it? Uh but but there is no no result, but it did some unit execution. Like it it does something. So, unit basically says it's a unit execution unit. Now, there are some other crazy functions. There is an infix function. So, when you define a function, you can

put infix up front and this is actually a combination with extension method. So, if you remove this infix from here, this says ints uh and then uh you have the method. Basically, what it is doing is that all the integers will have this method automatically. So, you can call them like that. But if you add an infix, this basically makes the method to be called like a

keyword. So, basically, you can call the method without the dot and without the brackets. So, basically, putting spaces. and this actually adds a lot of possibilities, while but there are some things that you need to be aware of that is if you have a function, for example, here we have a class and we have some items and we have some function that is adding some stuff to

these items. If you invoke it as a normal function, it's a normal ordinary call. But if you invoke invoke it with infix, you need to provide all the parameters ex- even the this. Which means in this case you have to say for which objects what are the two objects or two operands of this function, right? Uh you cannot just call add seconds. Now, in Kotlin you also

have local functions, a function inside a function and you can just call it. Uh and you have a lot other functions. You have inline functions where it's a function, but when you call it, it will not actually be called with uh invoke dynamic or invoke by virtual or whatever. Instead, it will basically copy the content of the function and at the invocation point. Which means yes, your

bytecode becomes bigger and bigger because every time where you call the function, it will copy the content of the function, but there is no overhead from calling a Uh you have generic functions, of course. You can have operator overloading that basically you can have a specific names for functions that you can put in classes and you can override operators like how the plus works and how the

minus works and so on and so on. Uh and you can have lambda functions and some other stuff. You can have single expression functions. So, when the function just returns an expression, instead of writing the brackets and writing the return statement, you can just write equals and then the the expression. And there is no difference between the two. Actually, IntelliJ probably will tell you you can convert

this to single And lambda's look kind of like Java, but with difference that there is no Yeah, so it it's kind of like Java. Uh and the reason why you want to use lambdas and not the single expression functions is that this is assignable to a variable, right? So, it's basically saying, I want to have a sum as a variable that will be actually a function that

uh, accepts two integers as parameters and it returns the integer and for these two parameters it's just doing a sum of them. So, this is the syntax and the smallest possible unit is over there. There are no parameters and it returns a unit. Uh, now there are higher order which means you can just define a parameter of a function that says the parameter is actually combined, which

is actually a function. It's a lambda, which again, it has two parameters and it has a result. The result can be part of the generic signature of the function and basically you can call this function and then in order to use this function or this fold, this is where the things getting interesting. It's sure, you can pass the body of this function over here, you can also

pass things like in Java. For example, you can pass uh, function reference, right? But, there is another feature. I think it's it's copied from uh, Groovy and it says, if the parameter of the function that is lambda is the last parameter of the function, right? So, for example, if I go back you remember the combine is the last parameter of the function, right? But, this is not

very readable. It's a bit ugly, right? So, it's possible or it's allowed to instead of using this syntax to put the body of the last parameter after the function. So, for example, here the default one is the initial value that you start from, but instead of passing this body as a comma and then the body and then close the bracket, you can pass this expression after the

function invocation. Now, this gives some amazing possibilities and these possibilities are to create functions like this run, for example, which means this doesn't have any parameters except a lambda function and because it can be passed after the name of the function, you have this syntax. And also in all of the filter, sorted, and so on and so on that we we know from the streaming API, Kotlin

is exposing it as a variable. So, if you don't want to define a variable and put the arrow and then use this variable, you can just use it. It means the element, basically. And you can have this nice kind of syntax where you never use the You always use the curly brackets. I think one is braces or whatever. And is again very intuitive. And it's not only

that, but you have type-safe builders. I will not go into details because we have only 12 minutes, but basically you can define a lambda function like that, which says I will pass something that will be callable on the HTML object and inside this function, for example, it creates and it calls the the function that I'm passing. And what is happening is you can create functions like HTML

body that accepts and so on. For example, here head and body are actually reusing the init tag. And at the end, you can have something like that. So, you can have a function HTML that inside it, it's actually calling the function body of the HTML and this body get added as a child. And so, basically you have this, but you don't have to write the this, right?

And it gives you this nice possibility to write DSLs. It's not only that, but it's it's more powerful. There there is a post there on the Kotlin website where you can see about the DSL marker. Basically, you can even forbid stuff. For example, you can say in the head I want to be able to add meta stuff, but in the body I cannot. Or in a body

I cannot add a table, but like in a table I cannot add another table. So, basically, you can make a compile time safe DSL for HTML. It's not only for HTML, a compile time safe DSL for And this is the biggest feature of Kotlin. If you ask me, I will drop everything that Kotlin have. I will focus on something like Kotlin script, and I will do as

many DSLs like like this one that can be used from everywhere. And you know that Gradle is have a Kotlin DSL, and you can use Kotlin. And actually, every framework from Kotlin have its own DSL, which is similar to that. For example, Compose that I mentioned, where you can write the same application that works on Jetpack Compose, which is the official Google supported framework, or multiplatform Compose,

which is kind of a port of Jetpack Compose to work everywhere. It looks like that. So, basically, you have a column that is a function that calls another function and another function and another function, and you have a state machine of functions, and you basically build an UI. Even without knowing how this will look, you know, oh, I will have a column, then there will be a

text, then there will be some spacer. I have no idea what is this 30 display points or DP. But let's say there will be some spacer, and there will be another text. So, it's super easy and super fun. There is also a Kotlin XHTML that is basically this HTML thing that I showed you where you create HTML with Kotlin, and this plus thing is like a hack

to use the plus for text. Because in Java in HTML, you can just write text, right? Um there is a Kotlin React wrapper. So, there is a a way or a wrapper to use React from Kotlin, which is very similar to TypeScript. All the types are basically the same as in TypeScript. But, the difference is that instead of writing JSX and this or this XML that is

like invading your TypeScript, you just write Kotlin that is compile time and it's safe like this H1 and so on. And you can have basically everything. You have use effect and everything that you can have from uh React. There is a framework called Ktor, where you can create a um applications very fast. Again, you say routing, then you say what is your get, and then you say

what is the response text. It's very readable, very easy. There is a framework called Koin, which is like a dependency injection, where you you have you define a module, you define your singletons, you bind them to some interfaces, and then you can just get stuff. There is even annotations, and everything is compile time, and everything is kind of safe, and everything is fast even on Android. Uh

there are ways to use Kotlin even for game development. There is a Korge uh game engine, and uh I find Ktor to be pretty cool. I will just show it but the Ktor engine have even a a very nice in web editor for for objects and for design. And actually, this Ktor editor or this Ktor engine, uh yeah, this is for uh Flyco and little Kotlin. And

what works is mostly for for 2D, but for Ktor, this is how the Ktor stuff works and how it looks. For it has a Ktor application where it adds a scene, and then in the scene you have a default camera, and you have a color which generates a cube, which is colored, and it has some shader and on the on update it rotates and this will basically

what and there is a widening over there and what this will generate well it will generate a cube that rotates and it has a widening. So it's very easy. Like this is I'm not into game development. I become a developer because I wanted to write games but I never get a chance but every library that I have ever seen is super complicated and super unreadable if you

have no idea about the library. Well everything is readable even if you don't know anything about the library. So why I'm mentioning this? Because now agents are writing the code. So you don't have to know how to use the you just have to know how to read code and Kotlin makes the code very readable. Also what I didn't show is that there are properties and okay I

have some some some slides about that. So we have classes and we have a primary constructor. So when you define a class you can define a constructor over there and you will get these properties automatically. So you will basically have a property that is called ID and a property that is called email. Now if you call this contact from Java an email getter and setter. So we

will have a get email and set email and for property you will have get ID. It's not only that but if in Kotlin you are calling a Java class that have getters and setters you can just use dot and access the property without going via get and set. And it's not only that but the biggest feature if you use records in Java and you know records have

this function like properties where you have to call the property name as a function. Well in Kotlin it's just a normal property. Which means you don't have to put the the curly the brackets at the end. if you create objects in Kotlin you don't have to use new. Because you are calling a constructor or you are calling a class. What the JVM expects you are going to

do with it? Why we are writing new? I have zero idea. The only thing that I want in Java is to drop the new keyword. I don't understand the new keyword. I'm calling a constructor from a class. What do I expect to have? Anyway, but yeah, in Kotlin you don't write new. Uh in Kotlin you have data classes. For for whomever is using Lombok, you probably know

what data class is. But basically you have all the equals, you hash code generated for you, you have the two string generated for you. It looks like there like like this here. And you have a copy where you can basically copy your data class, change some of the property and get another data class. If you are using Lombok, this is like with Lombok if you use to

builder and if you use builders, it's kind of similar. And this is the copy. Like you have a user that is Jack and you want to copy the Jack but make the age two and this will become an older Jack. Interfaces are kind of like Java but not the same. For example, you can define a body of the method in interface. Uh when you do inheritance, in

Kotlin you you use two dots. So it's always two dots. There is no extends and there is no implements. It's only only two dots but it's not stupid as in C#. Where if you put the two dots in C#, you have zero idea which are the classes and which are the interfaces. In Kotlin, all the interfaces are written just as interface. Just the name. And all the

classes or the single class will have a bracket here. So you know, oh, I'm calling the the constructor of the other class. So I know which is the class. So you don't have to have like an I prefix or some other stupid work around because the language design is bad. So you you can understand your code without an ID. Um anyway, you can have properties and you

can of course the interface can extend themselves and this is uh interesting. So, some people will ask, "Oh, what if I have a body for multiple interfaces?" So, for example, I have an interface A here with a function foo that have a definition and a bar that doesn't have a definition. And I have an interface B with foo and bar both having a definition, right? Well, in

in the case of C, if the C is only extending A, it knows what foo it is receiving, which it needs to provide only the bar, only the empty method. That's fine. But, if you make a class where you implement both interfaces, then for every method, even for the methods like like the bar that it's more or less clear that it is coming from B, but in

order to find out it's coming from B, you have to open all of these classes, which is a bit stupid. So, you have to specify which of the methods you want to use. For example, if you want to use the method from A or the method from B or you may want to call both of the methods. And in the bar, you can define your own method

or you can specify which Uh, and there are other classes that we don't have time. We have abstract classes, enum classes, sealed classes, inner classes, value classes, and so on Uh, there are a lot of amazing features in the language like smart cast. Smart cast is like if you check with if something is whatever instance, something is blah blah, then inside of the if, you don't have

to cast it. It's automatically casted for you. So, basically, if you have a variable that you don't know what type it is, then you say, "If I is string, then inside this if, I is automatically a string and you can call any method a string. You don't have to define a variable after the instance of like in Java new versions and you don't have to cast it

inside. It's automatically casted. It has properties. Uh, it has initializer blocks where basically you can have in it as a block that will be uh executed every time there is a destructuring. I will say the old destructuring is very There is a new destructuring that is coming in different options in the newest version of Kotlin, but basically the idea is if you have a a class with

multiple properties, you can just destruct this class and assign variables to to the value of the properties. There are type aliases that you probably if you have ever written TypeScript, you know, but sometimes you want to have a type alias like geo point instead of writing this pair every time. and if you import stuff and if you import multiple Firebases, for example, you can say alias as

something, which means inside of your class, instead of uh you can just use FB. Basically as an alias. Other features. There is an object, it's kind of like class, but it's singleton. It's only one. And data objects, kind of like a singleton data. classes are closed, which means by default you cannot extend a class. You can you have to open it. By default, methods are final, which

means if you don't basically allow, your method will not be overridable and um yeah, there are some things that Kotlin doesn't have. There are no checked exceptions, which something that I really don't like Kotlin Kotlin about, but maybe I'm the only person in the world that actually likes checked exceptions. But I don't know, with AI, it's even easier to forget to catch something. And if you have

a checked exceptions, AI have to catch it, right? So, I find checked exceptions great. Uh there are no static methods and no no static members. So, static, this keyword that existed because of I don't know, C++ and C developers, it's no longer here. You have extension methods, so you don't need the utility classes. Also, there are no these wildcard types with the question mark and raw types

for collections. primitives and objects. So, there is no int and integer, and they are not the same. Here, it's always the same. It's Uh it doesn't have default value for Uh when you have an inner class, you don't have implicit reference to the outer class, which is a bit uh different. There is no synchronized as keyword, no volatile, no strict floating-point, and no native as a And

there is no package private visibility. Um now, I will just mention a few things here because we have zero time. If you want to write Kotlin, you have to use kotlin.org or kot kotlin.in. Um it's easy to to know. Um there are a lot of examples for web frameworks. For example, here Kweb, but I cannot open it because the company that I work for believes that this

is a pornographic website. Anyway, it's not a pornographic website. It's a web framework. and if you want to learn Kotlin, there is a very nice kind of UI playgrounds, where you can even play with the Kotlin multiplatform compose, and it's even compiled, and it even works, and here you can select different versions of Kotlin. Even you don't have to install them on your machine. For example, there

is this uh release candidate two for the next release of Kotlin, and here you have different targets. Like, you can say I want to target the JVM or JavaScript or uh multiplatform, basically meaning more or less everything or was them and so on even if you don't want to install Kotlin, you can play with Kotlin. And on top of that, last month, in order to use Kotlin,

you have to use Kotlin compiler. So, you have Kotlin set, same as Java set, and you just compile code. And you have to use IntelliJ IDEA because IntelliJ IDEA was the only ID that kind of have support for Kotlin. Now, there is an LSP server for Kotlin that works also in Visual Studio Code. It's not great, but there is. And also, they added Kotlin tool chain. So,

you can install it with SDK man or whatever you're using. And Kotlin tool chain will give you the Kotlin keyword in your terminal where it's easier to actually init Kotlin projects. You can just call Kotlin init and Kotlin create and Kotlin run and stuff like that. And finally, I will only mention that the reason why I started with Kotlin was because I wanted to be able to

write applications, for example, like our hackathon application, this companion app that I explained, and I wanted to work on iOS, Android, and everywhere with the same code base. And it works. And it not only works, but if you are targeting the JVM during development, they are using the DC behind, and there is a hot spots reloader, and there is a plugin that basically reloads your application when

you do changes in the code without restart. So, you base you basically have hot reload. This hot reload only works on the JVM, but this is fine because while you are doing development for your multiplatform, you can just use the JVM, and then you can just test it from time to time on the simulators, right? but yeah, that's all. I know that it was very introductory talk.

Now, I as I said I will be making on the 9th 29th of October Full Stack Conf in InterExpo Center. So, you can join today at the raffle. I will provide free tickets for everyone that wants to join, so you don't have to buy a ticket. And for sure there will be talks about Kotlin. For sure there will be a talk for how to use the dependency

injection in Kotlin or how to use the web framework or how to do the the UI and so on. that's it. If you have any questions, we don't have much time, but sure. And you can also find me usually I'm got you for most social networks and you can tell me you know, Kotlin sucks. I will write Dart and I will say sure. That's what I also

do, but whatever. but for now uh I believe Kotlin have a chance to something great and something very common, but it's up to JetBrains and Google. Actually, it's more up to JetBrains because Google I think already did everything that they can. Any questions? Sorry? Yeah. So, Kotlin the the idea is to be a pragmatic language. For sure in Clojure or Scala you can write a lot of

more amazing stuff. maybe I'm not clever enough for Scala and I'm definitely not clever enough for Clojure. Like Clojure is next level. So, Kotlin is something that initially it hurts my brain a little bit. But it's it's it's enjoyable. With JavaScript it hurts my brain a lot. And yeah, actually it's so far only I was enjoying only two languages without brain issues and these were Java and

Dart by the way. Every other language I find a little bit too complex and too complicated and too unenjoyable. And Kotlin is actually right at the sweet spot where it's like it might become very bloated and over-designed and complicated, but it's not yet. But it's hard, but it's too hard, but not so hard so I cannot use So, I think it's a very sweet spot and I

Yeah, I think TypeScript is over the sweet spot because of the features that the TypeScript has. And maybe because it compiles to JavaScript, so Um but yeah. But yeah, Scala and Closure probably are what more beautiful and clever languages. Other questions? So, if you are participating in the hackathon, by the way, I know that we don't have time, but actually it's not it's not super hard. I

will just show um something briefly. So, I was um experimenting with new So, I asked I added I think Sun that 4.5 actually and I told him, "You know what? I'm using the old reader for news. Can you build me a new UI for RSS reader using the old reader RSS?" And it actually created a multiplatform project that kind of looks like that. So, I kind of

can see my unread posts and I can go and I can actually read them. So, it's a one-shot. It's a one-shot application to have an RSS reader. I think some people are paying a lot of money for that. Um and it's not only that, but for example, Bear Compose. I don't know, do you know the bear up? But again, I asked, "Can you create an app like

Bear for notes, but in compose?" Okay. it doesn't work now. But basically, it it manages to to create this app in one shot. Of course, I created this app also in other languages like iced which which is for rust. And I was actually even comparing. So, the application that was generated, so this is the rust application. You can ignore it. But the rust application, yeah, it's super

fast, but it it takes 100 MB of RAM. The compose application, yeah, it runs on the JVM and it takes 100 MB of RAM. The Flutter application that I generated, it works on Flutter and it 100 MB of RAM. So, there is not a big big of a difference. So, at the end, what I'm trying to say is even if you don't work as a full-time Kotlin

developers, you can just code and write something for your for yourself in compose. Like I have here a Swift application that I never use, but basically this bar over there, I really hate that you cannot [ __ ] get rid of it. I don't know who Apple [ __ ] came with this idea to have this bar there, but I hate it. And if it's out to showing, it's always showing

on top of my tabs, so I just wanted to get rid of it. So, I just asked, "You know what? Write a Swift application that if my pixel my mouse goes into the top pixel, move it eight pixels down." So, that's what it does. Now, I cannot like I cannot show it because it moves down. So, you can use Kotlin or any other language, even if you

don't know it, to create some small stuff to help And I think Kotlin is great for this because then less tokens. Okay, thank you and you can catch me and we can have a a chat. Thank you.

From event

jPrime 2026

03 Jun 2026 – 04 Jun 2026

All event videos
Back to Watch