Kotlin in 100 Seconds
Вставка
- Опубліковано 8 лют 2025
- Kotlin is a programming language designed as a modern alternative to Java. It supports functional patterns, coroutines, multi-platform compilation, and is now the recommended language for Android mobile development.
#programming #android #100SecondsOfCode
🔗 Resources
Kotlin Docs kotlinlang.org/
Kotlin on Android developer.andr...
Watch Java in 100 Seconds • Java in 100 Seconds
🔥 Get More Content - Upgrade to PRO
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
🎨 My Editor Settings
Atom One Dark
vscode-icons
Fira Code Font
🔖 Topics Covered
Kotlin vs Java
Kotlin basic syntax
Using kotlin on Android
Kotlin coroutines overview
What is kotlin?
Is kotlin a JVM language? - Наука та технологія
When i learn how to run a function in Kontlin, it was literally fun
Right? Was always avoiding Kotlin cos I’m used to Java and it was always funny cos I didn’t understand it
@@farhansangaji5029 I'm here for you 🫂
Haha lol 😂
@@GlenBondMogane claim your wooosh tickets here
And it's hard not to get excited about null safety!!
I like how we are kind of getting to the point where all modern languages have extremely similar syntax
Kotlin looks similar to TS
imo
The C family at least. But I like that some of the recent changes bring similarities to Python, which I enjoy writing.
And Kotlin does looks really damn fun. It's among the ones I'd like to learn the most along with Rust
@@vicca4671
> the languages I'd like to learn
Make sure to put Haskell in that list, if you haven't already. Even if you don't use it in any projects, Haskell just gives you a different perspective.
@@mrocto329 Tbh I was hoping to learn functional programming from languages I already know that support it hahahaha. Haskell kinda scares me
@@vicca4671 rust is love
Man, I can't believe how qualitative and frequent your content on this channel is. Good stuff!
Quality.
Agreed, can't believe I hadn't found this channel sooner
qualitative...
@@rekales5826 They're just utilizating the English nomenclaturatorium to its fullest extension.
@@rekales5826 it’s very much on a screen that you can see
One of my favourite things about Kotlin is how it automatically generates (and USES) getters and setters, not just for data classes but for normal classes as well.
When you write class.property, it implicitly calls the getter associated with the property (~ class.getProperty()) and you can overwrite the getters & setters yourself. It really makes code a lot shorter once you get used to it. class.property = value class.setProperty(value);
@@Sasukeku12 The difference being that Kotlin can do that without extra dependencies and imports. The fewer the (usually) better.
Just like C#
Lombok:
Ok
It is extremely reminiscent of C# and this is a Good Thing(TM).
Same in MATLAB
Really well done summary, you really mentioned everything important
You're the best man
@@nacholoyola1972 No u
@@codinginflow no u
You've taught me so much thank you man
ua-cam.com/video/rZUfzlOIqJo/v-deo.html
Well, never ever stop this series. Whenever I need to learn anything new, I search for your 100s videos to get familiarized with the topic before I actually start learning it.
- How's Kotlin?
- We have a lot of "private fun" in it 😆😅
made my day
I prefer a bit of public double penetration; myself.
I actually don't, I much prefer Kotlin to Java...
open is protected
Out of context it's very funny xD
internal fun
Guys, u know what, this is actually been more than 2 years and im so much in love with kotlin, i literally enjoy it a lot, also it have the fun keyword that tells that Kotlin is actually very fun to write, and i literally don't have any complaints or regrets for learning and using Kotlin.
Did you only make Android Apps with Kotlin in your experience?
@@abdullahmemon1554 i literally do many things with Kotlin.
@@mohanaggarwal4058 can you tell us please
@@abdullahmemon1554 I use Kotlin with Android for the front end and with ktor for the backend.
The only thing I don't like is the Gradle build system.
@@mohanaggarwal4058 what do you do exactly
This man has answered the prayers I've been praying for a while. I think he saw my request in one of the comments or this vid was inevitable. Either way, you're a solid one, Mr. Fireship 🚀🚀🚀🔥🔥🔥
what are you hoping for next?
Heh, I was asking for it for weeks, he never responded
i swear you are going to talk about all languages in existence
100 seconds version of Derek Banas
Only have about 700 more to go...
@@tabloosempakharhor5300 What nonsense is this
@@ebenmeluifechukwu4298 Those are bots, they appear in almost every youtube video these days
@@Fireship can you block @TablooSempak Horhor he is literally spamming in every of your videos and this link may be malicious
My 3D printing teacher: mentions Kotlin when we were talking
Fireship: I'm on it.
@@tabloosempakharhor5300 these comments are fucking dumb
@@orvit3467 its a fuckign bot by answering you're wasting time
@@orvit3467 It's a bot, report it and move on with your day.
@@2hotflavored666 I know it's a bot
So, 3D printing teachers are a thing ?
Kotlin isn't the first java alternative, but it's definitely the best so far.
There's also Groovy and Scala
Scala is the better lang imo, but kotlin is a much more natural progression from java
Scala is good for ML. However, I still prefer Python or Kotlin.
@@michaelxz1305 Rust is loved because how safe it is when it comes to memory management and boy the compiler is amazing it helps you to debug your code easily and cargo package manager is just too
@@thatonegoblin7051 you are right about "kotlin more natural ...", you can give kotlin developer java library and use it without knowing it was written from not kotlin language
But imo kotlin is really good especially when creating classes and function
And what i like this language is REALLY minimal(in syntax) like JavaScript with types(TypeScript)
I haven't tried scale but still understand your opinion
And unfortunately Spring Boot has no Scala support out of the box.@@thatonegoblin7051
I am litteraly addicted to those videos. They're the first video I watch when I see them in my feed thanks to the simplicity of the information. It just gives a taste of the technology enough to motivate me in learning more. Amazing work as always.
Swift would be very nice next! :)
When I first discovered Kotlin, I was like, man.... How can something like this comes to mind ?!! Being multiplatform, a better Java, boiler-less, and many more. Not even TypeScript came close, in my opinion, when it comes to developer experience. I know both language BTW, and I also had Java in the past. Kotlin, for me, feels very human to read.
It was the obvious upgrade to the useless Java syntax
The one line if else statements are really nice, it's "val max = if (a > b) a else b"
@@skyhappy Java has the ternary operator for the same. Not really an improvement
Typescript typesystem is far superior to Kotlin's. Structural > nominal
@@hugodsa89 I'd disagree on that one lmao. What are your examples anyway ?
You’re a logical machine my dude! Churning out the high quality content DAILY
Still waiting for "How to write a Unix kernel in C in 100 seconds."
😂
🤣🤣🤣🤣🤣🤣🤣🤣🤣
Kotlin makes you feel motivated learning OOP. Been using it for 6 months now for android development and damn I wish Ive known it sooner.
Kotlin is quite opinionated / biased (in a positive direction, the way i see it) when it comes to object-oriented design.
eg. it encourages immutability and composition (delegates), while discouraging inheritance (classes and functions are final by default, you have to mark them as "open" explicitly, in contrast with Java where it's the other way round).
I hate java with the bottom of my soul. Once I discovered kotlin, a let out a cry of joy and went to tell my gf. And nope, I'm not joking! finally a chance to get into the android world!
having written in Lua, JS, Java, python, C, and a bunch of other things it looks like Kotlin is a great mix of everything good you could pick from other languages
Yes...
i have no word to describe the quality of the content.
It's nearly unbelievable that someone thought me some basic about Kotlin in 100 seconds.
Thanks for that qualitative and so frequent content.
"Look Mom! No Semicolons;" has gotta be the best thing I've heard in the last 3 months!
You should listen more.
watch cobol in 100 seconds xD
In addition to coroutines being its a killer feature, kotlin scoped functions also come in really handy
Waited for this for so long! This is my favorite language, and I really recommend it to everyone!
you can play with extension functions, inline functions and collections so much you might forget java. also good for spring boot based backend development.
Honestly, I've been out of the Java world for many, many years, but something about Kotlin has got me excited again🤷♂
Why?
Java is cool 😎
@@Ihavetoreturnsomevideotapes More like Java is hot. Get it? :wink:
kotlin is sexy
Oh sure....
Please explain, because for the last 20 years I thought that code was code, it was all just a tool to get the job done😂🤷🏻♂️
@@jacquesduplessis6175 java is too verbose
I don't understand, I am just starting a project for an Android app and this man releases a video right as we are holding the discussion about Flutter vs Kotlin XD
It's Dart vs Kotlin :)
Amazing! LOVE THIS! SOOOOO Many hours-long videos out there to waste time! Love how this short video shows me the whole overview of what I want to know as I consider the language!
I love how the biggest new languages in the last few years have basically been "that but not shit":
- type script
- kotlin
- carbon (I know it's not out for another few years but they hype is already real)
cuz the existing stuff was shit 😂
better PHP is nowhere to be seen though, maybe I haven't heard about it, or the language is just a hopeless case ;)
I would really like to see some longer videos going into depth on some of the languages you go over. That would be sick.
I've been using Kotlin for a few months now, by far the best language I've learned imo.
same!
@@justADeni well, second behind Rust now :P
I use Kotlin for over a year now and i love it, its my favorite and first pick language. It's great
OMG THE REAL STCKOVERFLW, LETS GOOOOO!!!!
Learned and used it for my senior project. I took mobile dev at the same time but class was using Java. I wanted a challenge so I used Kotlin instead and I love it.
Keep it up Jeff. We're loving these 100 second videos! 👏
You have the best pronunciation. I'm from Russia and I understand you. Thanks for video! I wait the next.
This is super helpful. I wasn't trying to learn kotlin, I just needed to know what it is because I saw the option to use kotlin for android apps
Dude, I told yall in that dart in 100 seconds video that kotlins gonna be next. It's proven that what I want, fireship delivers lol. Great work tho.
In a perfect world, Kotlin would be flutters language.
I don't think multiplatform kotlin is actually a thing. Not yet. About 5 years behind.
I as a beginner programmer might consider learning Kotlin because not only is it an easy language, it is also the perfect language to bridge the gap between Python and other, more complicated programming languages since Python is (one of) the first programming languages I've learned and this language's syntax is a little bit similar to Python. Thanks for the introduction!
no wonder I liked kotlin after checking out python^^
To my most favourite UA-cam creator, Jeff, u now proved me that u don't dislike Kotlin, i hope u would try it more and fall in love with it. My wishes for u, and have a nice Kotlin!!😊😊😉
that syntax is a lot more *fun* to write
that pun is mandated by kotlintic law but that was tasteful execution, mr ship
Random dev: so how's kotlin
Me: It's so much *fun*
have you tried scala in comparison ?
Rust developer: fn, I'll give it a try!
you stole my joke give it back
mine was funnier bc i said this is where the fun starts so yoiur joke is trash haha
Oh! you did actually made this video! Just found it right after putting a comment in the previous video! Nice of you to make these videos. 😎
You should do Lua in 100 seconds, it's a pretty simple and fun language, especially when used with C++
I am currently making an app using Android Studio written in Java, after watching this video I might develop my future projects in Kotlin :D
@@marlenasopi2469 thank you :)
Everyone: "Hello World!"
Fireship: "hi Mom!"
Learning Kotlin in this Semester. Your timing is awesome. Thank you. I use Arch, btw :)
i also use arch (and kotlin) btw
I use arch btw, and now i can start learn kotlin
@@nepnep1057 i use almost pure arch btw, and yes, I'm Kotlin, rust enjoyer.
Good video, man! I'm wondering whether you will bring more "JVM languages" to the language in 100 seconds. A Scala video would be amazing too
I literally started with a Kotlin project to learn the language 1 hour before the video came out, perfect timing!
Best programming language so far. I really love it
Thanks for making this 🤗 I was waiting for it
You should do a video on the Ceylon language for the JVM. It's dead now, but had a similar goal to Kotlin. It had some influential stuff for its time, like the Null safety "?" syntax, but also has this crazy type system of union and intersection types. It's a cool language, shame it never caught on, although it lives throughout these new languages.
it was another attempt to improve on Java, and it's an interesting piece of history.
there was also Xtend.
it would be quite interesting to review what approach their authors had taken to address the shortcomings of Java.
Best channel for prograamming content
Congrats on 904k subs
This video covered like 10% of the cools stuff Kotlin brings over java, but still gave a good feeling to watch! Kotlin is becoming the most loved language in the world and soon might take down JavaScript from the top ladder :D
Who told you javascript is the most loved language 🤣
@that's a lot There are a lot of statistics on the net, I don't know the criteria of a language to be classified as "Loved" but JavaScript is definitely more used than Kotlin
@@TamimProduction "more used" then yeah it is but not even close to most loved, that is rust.
And these are based on surveys
Love to see this channel growing
An interesting thing about Kotlin is that it does away with static members on classes (which is a kind of weird thing when you think about it, since it is not really so object-oriented) in favor of a "companion object" which has static methods. A class that can be instantiated can not have static members.
Static methods were less obviously object-oriented, yes. But they were still class-oriented.
I find the companion object more confusing, because it has no real life equivalent.
@@GT-tj1qg it might look a little ugly and "too nested" but on the other hand it helps to visualise very clear separation between instance and static methods
There are many great things in Kolin, like the lambdas, that make it ridiculously easy to create and use DSLs.
Other aspects feel a bit too much like workarounds for java issues.
Take data classes, they provide a bunch of useful functionalities, but I have a hard time seeing how it is better than the more flexible derive machanism used in Rust. Haskell has something similar if I remember correctly.
Coroutines are great, but async/await is probably the superior pattern in most applications.
Kotlin can in theory be compiled to different targets, but in practice it's a huge pain. Despite being backed by two huge companies native targets are still way less performant than the JVM and lack support for many important elements of the standard library. All the Multiplatform projects I've seen are littered with expect and actual functions. This massively fractures the ecosystem, because libraries typically only support a few select platforms.
holy shit dude, i was just making an app using react native for the first time and honestly it really confused me even tho i consider myself a good nodejs dev
so i was thinking of learning kotlin or java
you're a saint!
so which one will you be going for ? kotlin or java ?
@@coder4life kotlin, java is.... just not for me no offence to java devs
whenever I need a basic revision of a language that I haven't been with in a while, fireship saves me time
Best Tech sitcom, I can watch it everyday!
Holy shit this language looks amazing. Some of the nice ergonomics of javascript with the enterprise OOP support of java. I will definitely be trying this out sometime.
I love the way he explains everything 😊 easily and quickly summary ❤️
Finally we got what we r waiting for!! Thanks Jeff!!😊
I love these format videos! I'd like too see videos on webpack, next js, redux and more 😃
Like Java or not, you gotta respect the work of art that it's HotSpot JVM is, to the point that many languages by default compile to run with it
Also at 1:56 Java has had records (things dedicated entirely to storing data) for quite a while now
they've added it years after data classes in Kotlin (which were there from the very beginning, if i'm not mistaken)
Java is playing catch up, and right now it has a lot of features that Kotlin does, however - Java being Java - they usually feel much more clunky to use anyway.
and Kotlin still has quite a few that Java hasn't - like contracts, or delegated properties, or various features that allow to easily develop DSLs, for example?
I swear I'm just waiting for a "Brainf*** in 100 seconds" at this point. Perhaps for April 1st?
You can say fuck on the internet. I promise I won't tell on you.
@@Gabbyreel while I can, I choose not to for personal reasons.
I made an add two numbers program with brain**** a year ago and I was very proud of myself 😂😂
This has been 100 seconds of Jeff being an absolute boss at explaining stuff. Thank you ! ♥
I wish I started Mobile Dev using Kotlin. Using Java is one hell of a pain in the a** to use.
what about flutter?
@@SajithUpendra Dart is a somewhat clunky language, doesn't feel nearly as nice as Kotlin to me
Flutter as a framework is pretty nice, but then we're comparing apples with oranges
I absolutely can't get enough of these overview videos, thank you! Please make one for Django 👉👈
As an Android developer, Kotlin has been nothing short of life changing.
a lot of programmers (from outside the field of mobile development) don't realize that while Android developers were forced to use Java, it wasn't even a modern version of Java.
@@vibovitoldjava is backwards compatible afaik, you can compile the new java code for an old jvm
Just as great and efficient as your website and your courses
I saw someone suggest this the other day watching your Java video - you mad lad, how did you already make this?
I think 100 seconds of code is one of the best series for programming on UA-cam - great work
i like how if i have questions about programming and when i search on UA-cam, your videos always on the top
In Poland we got a ketchup called "Kotlin"
I'm learning Android development with Kotlin and boy it's a sweet language to code in. I want to use it for everything.
Using it in the backend and it is such a great language
With Ktor or Spring?
@@EhteshamShahzad with spring framework
@@EhteshamShahzad I wish ktor would gain more traction... It's DSL nature is such a joy to write with
I just love those series, can have a look at all those cool languages even with my short attention span. Thank you
Java has data carrier classes called Record Classes since Java 14 which also does get rid of a lot of boilerplate code.
Most people are still stuck in Java 7 - 11...
You deserve many more subscribers
Awsome summary but you forgot kotlin on the server ,ktor and spring also how powerful kotlin is at dsl with gradle as an example also with recent improvements as it trys to be used in data science.
Kotlin is beautiful.
I thought I will never see something replacing Java other than C#
But this does bring a smile to my face.
Which would you pick between kotlin or c# ?
Kotlin seems fun() to learn
there's a minecraft mod called "Kotlin for Forge" that some other mods use as a library, so TIL that mod adds programming into programming.
It's worth noting that Kotlin also introduces immutability (val / var).
"final" in Java
@Nathan Dougherty if something is read-only, you can't mutate it
you may be able to mutate its internal state of course, if it's designed that way, eg.
val mutableList = mutableListOf()
you can't reassign mutableList itself, but you can change its contents (sure). the variable itself is still immutable though.
@@vibovitold more boilerplate. For example, making a list in Java vs Kotlin
Java:
final ArrayList cars = new ArrayList();
Kotlin
val cars = mutableListOf()
Many thanks, I love the way you shout for your mom on every video, lovely gestures🌹
Me: (browsing UA-cam, watching random videos)
Fireship: (Posts 'Kotlin in 100 seconds')
Me: :)
Finally I love this Lang :)
I still can't believe Java developers are hating this language
i dont know any java dev that hates it, majority love it when they try it, sadly not all companies are ready to embrace it
@@krellin a minority takes such approach, but it usually boils down to "i can't be bothered to learn new stuff, but it feels better to proclaim that this new stuff is bad than to admit i'm lazy"
Literally one of my favorite languages right next to TypeScript
One day I will invent a language. Just for the sake that Fireship can summarise it. 😄
I love these videos, short and to the point.
So it's a beautiful blend of javascript and python ! Fantastic video !
not how i'd describe it at all. it doesn't have the JavaScript quirks (like exotic, prototypal OOP) nor the Python ones (meaningful whitespace), not to mention that both - unlike Kotlin - are dynamically typed.
even among just scripting and dynamically typed languages, it probably bears more resemblance to Ruby, for example by being more adapted (than Python) to functional programming constructs
of course when it comes to programming languages that feel reasonably modern (even if they're not technically new), all of them will show SOME similarities to eachother
Kotlin is probably more similar to Scala (but it doesn't get as cryptic) and Swift (although it wasn't influenced by Swift; the development of both started roughly at the same time, however Apple didn't show Swift to the world for a while)
i've just binge watch your 100 seconds series then this come out, thanks to kotlin my android making a lot easier
Yep, Kotlin is a great language! Null safety, no boilerplate code, and it's fun to write! :)
I thought this was going to be a joke video since I didn't expect you could actually give a good summary of Kotlin in 100 seconds. Great.
I think my next language would be Kotlin 🔥
Kotlin is a fantastic language for backend code. Coroutines make efficient database code a breeze and actually fun to write/maintain
I used to develop a lot in Java 10 years ago (switched to C#). Are there any downsides to Kotlin in comparison to Java? Didn't get to check it out. Heard of it couple of years ago.
Best way to throw shade on Java: introduce it as if it were OK, then 2secs later present its prettier faster better shorter sibling.
Kotlin is good for private fun 😇
Great video! Clojure/Scala up next? A video on the JVM would be nice, thank you!
So by this pattern, looks like swift would be next. Tell me if I'm wrong
Great video! I actually requested this one so thank you!