How to Kotlin - from the lead Kotlin language designer (Google I/O '18)

Поділитися
Вставка
  • Опубліковано 16 сер 2024
  • Kotlin is similar to the Java programming language, so it's natural that your Kotlin code looks very much like Java code when you are first start to use the language. While this is fine to begin with, you're probably not taking full advantage of all the language benefits. In this session, the lead Kotlin language designer will show you how you can write more idiomatic Kotlin, what the benefits are, and help you discover some of the most powerful yet lesser known features of Kotlin.
    Rate this session by signing-in on the I/O website here → goo.gl/rcxeHQ
    Watch more Android sessions from I/O '18 here → goo.gl/R9L42F
    See all the sessions from Google I/O '18 here → goo.gl/q1Tr8x
    Subscribe to the Android Developers channel → goo.gl/GEh1ds
    #io18 event: Google I/O 2018; re_ty: Publish; product: Android - Languages; fullname: James Lau, Andrey Breslav; event: Google I/O 2018;
  • Наука та технологія

КОМЕНТАРІ • 273

  • @igorg.8624
    @igorg.8624 6 років тому +251

    A class can be created with a single line of code, without getter/setter garbage. I love it!

    • @593jorge
      @593jorge 4 роки тому +26

      ​@@trollberserker1515 Yes but that class would be pretty much useless. Adding functionality would require several lines. This one-line class is completely functional in Kotlin:
      data class Person(val firstName: String, val lastName: String, val age: Int)

    • @almasabdrazak5089
      @almasabdrazak5089 4 роки тому +1

      @@593jorge check out the records blogs.oracle.com/javamagazine/records-come-to-java

    • @Jennifer123515
      @Jennifer123515 2 роки тому

      @@trollberserker1515 I Y Luis ilustración kk millón Illinois de pesos dólares lipkkikiiii6i6ii66nimmkmnmkmii6miyil6yiiki6i98klki6k67ikkkukkikkkkkkkki666i6i6ikyminkinnmu7mmmmiim66miikmyi7u6k8kikkikkikk8kkikkk6kikkkki7k666iikiyiu8kikmlkkkyjknkiikkl7mik6ikkkkkkkkkkkk7kkkukkkkikikkkkkkmmmmmml766m6ik668k666k66k6666766(pesos huy k6kikilu66ikni6hj6i66ikik66ikiikh6k6kpkk7iikk6kkukkilkipk6866kii9ii6yiiim7miil7mimjumi6umk66iyiikuy6iy6uilu6ui666u66iyki6ikik677kikkkikik6k6666kk6kkkk6kk86ikki6iuiiiu6kmlnknmnn66k6iki66ki6klukkkkkklkkkkkkuk7ll9kkikkkkkkkmkkmuk9mmik66iki66k7iukpkk96kkkkp6l6kkkki6kkki6kkk8mu8mkk8klimmm666y6i7k6k6kkki6ki6yi68kkk8ikilkkkkkkkkkk6kkkkkkklijpi66k7iyiik6k6bkn888km8m868k8u6m8nmi6kmii6i67iiiliillkkk6kllkiiiipipii6iikiyikiibikimk6mm6iuik6imibim8myiynip9bniiikkkkiiiikiiiiiiiiii887k7ik7iikoii6jijiyjkiiijkiikik88kkkkikj6ijiyiikikkk8k7k8kk78kkk86k7k8k8kkk7k67ipjplp9kkl876k7y6k7mlkl76kl7l6ikkii767ijkikll6kklk6kklkk66kkk6lkkklkkkkkkk6i7li6ik68ii67yklk6klk6l6iii6iiili76kyk7llll7i8pl7ibi6i6iijukk7ll67lkpkkkyk6lll7kklk7kpk66k8lk66lkk6kkklkk7l6k8678k7k9i7ijl7i7iki7iku8mi7n8777866788likkikikyik7i6ik7kl6i6k7kkp76kk6kk676kkykk6kkk6klkkkk6kkkl7ii6iiklikk6i86k8i6m8k6kk8kl86lyi7i7ii6i7li7k7k6k8kkkl66k7k68k8k6kk88kll8kk8k8l79k6k86k7kk8kkk866p68jkiij9ikiiiiil8hj8p78lyl6lk68k8knk8jkiij97yi8lk8pjkllkj9l8k78kjk8klj8j8l7jipp8j8piipij8pi7ki77k7i78k96lkipi68666yk7i7ip98k776iki778klkkk6k8kky8lk8kk8i6kk88i86k66kkkkkkk6kk8kkkkk8lkk68k7k8k8i6kkk6j9ik68k86k6787k8ikk77k8iiii6k8i7i8kk7kkkkkkk8kkk88kkkkkkkk6kkkkkk8kkkkkkkk8kkk8iii86ki6ik8kkk7iikyyi8ikkkk8kiik87kkiki7iiiiiiii6k866k8k7kkki67ki86kkk88lk78ik8i78kk88k778iliikyii6iiiikikkiik7iiikk8k7k8iy776886k78i7l77ki8pkkk78k8kk8il8kkkkkkk8kbp

    • @Rogueixpresents
      @Rogueixpresents 2 роки тому +4

      @@593jorge all I hear excuses

  • @parisqs
    @parisqs 6 років тому +236

    Kotlin seems to take the best syntax suger from C# & JavaScript to Java world, which Java failed to provide for years. I am impressed.

    • @chuganator
      @chuganator 5 років тому +10

      You're so right. Java is so late.

    • @abates3747
      @abates3747 5 років тому +12

      @@chuganator ...Java the language is late, Java the JVM is still the wonder drug that it always has been. Java is dead, long live Java.

    • @Qrzychu92
      @Qrzychu92 3 роки тому

      modern C# isn't far behind at all, especially when you mix in some F#

    • @abates3747
      @abates3747 Рік тому

      @Ahmed El Ashry , java is not dead. I said "Java is dead, long live Java", the only thing replacing Java is more Java

    • @abates3747
      @abates3747 Рік тому

      @Ahmed El Ashry , I've tried to escape youtube many times, but continue to fail.

  • @TonyStark786
    @TonyStark786 5 років тому +36

    More than the language, I like this person. He is so humble and down to earth. Great mind.. humble human being!

    • @jordanforever2345
      @jordanforever2345 4 роки тому +2

      yeah, I agree. He is not cocky. :D

    • @raianmr2843
      @raianmr2843 2 роки тому

      honestly, in my experience, everyone from jetbrains seem really humble, practical, down to earth people. the corporate fakeness is completely nonexistent here. they sell their products by showing their merits, not by excessive claims or false marketing or appealing to emotions. i guess this has a lot to do with who their customers are: jetbrains sell development tools for technical people, there's a lot less room for bs here and I guess this has attracted non-bs people to their company as well

  • @davethomas1303
    @davethomas1303 6 років тому +159

    Poor Andrey, he seems so nervous! Mind you I would be too lol.
    Great language he created. Many thanks from me, it has made my Android development fun where I have used it.
    Keep the good stuff coming with Kotlin!

    • @MohdAkmalZakiIO
      @MohdAkmalZakiIO 6 років тому +11

      It's a presentation in front of thousands and not just a small team. And maybe he didnt have rehearsal like Google's speakers.

    • @igorg.8624
      @igorg.8624 6 років тому +7

      Yes, and maybe he's just being authentic without putting on a facade (because he doesn't need to since he is the inventor).

    • @willmakk
      @willmakk 6 років тому +1

      *modafinil intensifies*

    • @christianj3891
      @christianj3891 6 років тому +7

      He is doing great!!

    • @krellin
      @krellin 6 років тому

      he is not :)

  • @IUfidi
    @IUfidi 2 роки тому +2

    Ive been studying Kotlin for 8 weeks: Its good to see Andrey give an overview of it.
    Thanks for helping to stick in my head.

  • @Hazarth
    @Hazarth 5 років тому +31

    Finally someone fixed Java and made it more C again with other great additions from languages like Python and C# and all that. There a are a *few* quirks I'm not particularly happy about, a lot of them come with the JVM baggage (like not being able to manage my own memory) and I don't understand why we had to switch to name:Type schema instead of "Type name" which I thought was always more natural to read like real text, but I can live with those

    • @samuelgrahame3617
      @samuelgrahame3617 5 років тому +5

      Yeah I hate the name type order. Reminds be of visual basic

    • @elodens4
      @elodens4 5 років тому

      it's from pascal

    • @Yagamilight19383
      @Yagamilight19383 4 роки тому +1

      loops and arrays declaration and not expressive though

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 4 роки тому +3

      Well most of the time you can skip those and maintain code clarity simultaneously. For eg:
      val obj: MyClass = MyClass()
      can be turned to
      val obj = MyClass()
      without losing any context of the code.

    • @Yagamilight19383
      @Yagamilight19383 4 роки тому

      @@VivekYadav-ds8oz you can do that in java too, var obj = new MyClass(); nothing new :(

  • @eatthepi
    @eatthepi 6 років тому +22

    That trick when he showed Kotlin byte code then decompiled to Java was pretty cool. A few months back I was a little confused about what the 'noinline' keyword was doing... this trick would have probably made it clear.

  • @davidrahauser4234
    @davidrahauser4234 3 роки тому +2

    I started 9 years ago programming java... this is like a DREAM! !!!!

  • @Vaintti
    @Vaintti 5 років тому +20

    This presentation just keeps on blowing my mind through the whole thing

  • @dewetvanrooyen8458
    @dewetvanrooyen8458 3 роки тому +1

    The Audience looked so happy. I am Learning a lot thanks for the vid.

  • @miraclemaxicl
    @miraclemaxicl 4 роки тому +30

    "Noise is harmful for your brain" - my biggest takeaway

  • @beginnereasy
    @beginnereasy 2 роки тому +1

    Yeah I was going to say it has Andre's personal philosophies directing the language

  • @code_report
    @code_report 6 років тому +9

    At 22:14, "this is something pretty unfamiliar for the C-language family" ... that is true pre-C++11. But with C++11, there are lambdas and immediately invoked lamba expressions (IILE), so you could write very similar code as follows:
    auto s = []() {
    if (condition) {
    cout

  • @twistentiger5610
    @twistentiger5610 5 років тому +10

    To anyone thinking they are used to Java and don't need to learn Kotlin or struggling, I say go for it learn it trust me all worth it don't think just do it

  • @edwinfcapidos
    @edwinfcapidos 4 роки тому +2

    I just learned Kotlin during quarantine. It's much easier to learn.

  • @yohanesmariavianey786
    @yohanesmariavianey786 3 роки тому +2

    seems like this kind of new awesome things but, we already doing this with c# for a couple of years

  • @ChrisCarlos64
    @ChrisCarlos64 6 років тому +52

    I would love to start using Kotlin where I work.

    • @francoislegrand1949
      @francoislegrand1949 6 років тому +5

      then use it

    • @RS-kt6is
      @RS-kt6is 6 років тому +1

      Why? Weren't you using Java annotations, boilerplate generators, and so on? Butterknife?

    • @igorg.8624
      @igorg.8624 6 років тому +7

      You should definitely start (perhaps start with unit tests in Kotlin). You will be thankful several years from now for learning Kotlin, trust me.

    • @RS-kt6is
      @RS-kt6is 6 років тому +1

      Igor Ganapolsky it's perfectly foreseeable Kotlin will die a slow death if Android apps are going the way of the dodo bird. 🐦

    • @owlishart2335
      @owlishart2335 6 років тому +10

      Kotlin is a general purpose language, not just Android. At work, we use it for backend web development

  • @jonesbbq307
    @jonesbbq307 5 років тому +109

    Me everyday learning Java: There has to be a better way

    • @VivekYadav-ds8oz
      @VivekYadav-ds8oz 4 роки тому +17

      Kotlin: There is!

    • @drewestification
      @drewestification 4 роки тому +2

      *slams fist on table*

    • @manashejmadi
      @manashejmadi 3 роки тому

      There has to be a better way. Sounds like Raymond Hettinger

    • @TradeMarkCuber
      @TradeMarkCuber 3 роки тому +2

      I learned a little bit of javascript and html then thought "you know what I should do with all of my 6 hours of javascript? Try to make an app in a different language for fun!" So now I'm trying to find a tutorial

    • @AdamLindell
      @AdamLindell 3 роки тому

      There is! Clojure!

  • @skin4813
    @skin4813 2 роки тому +1

    Andrey, thanks for creating Kotlin.

  • @zaborshicov
    @zaborshicov 5 років тому +4

    Hello from Saint-Peterburg!) In this city Kotlin has been started!

  • @vorname1485
    @vorname1485 4 роки тому +2

    A very advanced project has the one Util class to rule them all.

  • @andres309ls
    @andres309ls 5 років тому +9

    i think i would say good bye to java after 10 years. i am very impressed.

  • @Yamasutra
    @Yamasutra 4 роки тому +1

    I'm impressed. Kotlin is Java, but not awful.

  • @travelerworld7666
    @travelerworld7666 6 років тому +30

    Great language, reduced NullPointerException which was one of the headache in java

    • @RS-kt6is
      @RS-kt6is 6 років тому +3

      Java had annotations for that, and you can and will still get a lot of null crashes now. Even more, actually, since every method where you specify an non optional parameter will crash instantly (Kotlin check) if the said parameter is null. So you need to design clearly each function param....is it optional or not, etc.

    • @nkl07ba12
      @nkl07ba12 6 років тому +16

      The difference is that these crashes occur at compile time and not at runtime, making you think about null safety more that when you just use annotations in java. Its about making you think in a different way about null safety.

    • @RS-kt6is
      @RS-kt6is 6 років тому

      Not if you use explicit pointers, or whatever they're called in Swift/Kotlin. If you unsafe-unwrap them, they will still crash at runtime

    • @NikhilMaurya10
      @NikhilMaurya10 5 років тому +3

      then why use kotlin at all if you are gonna unsafely unwrap the optionals

  • @dailymedicalcentre5237
    @dailymedicalcentre5237 4 роки тому +1

    Another programming language and from this presentation it does look better than existing JAVA. It takes a lot of time, effort and working experience to master a programming language, why can't these programming language inventors work together to perfect the existing programming languages instead of keep creating new .

  • @Luiz6447
    @Luiz6447 3 роки тому +1

    Beautiful! It seems easy to switch from Ruby to it.

  • @boddendanieldeveloper1494
    @boddendanieldeveloper1494 2 роки тому

    Kotlin is really power skills for everyone developer!

  • @-Alexey-
    @-Alexey- 2 роки тому +2

    33:16 I think the code should be like:
    s1.request(s2.name) { r1 ->
    println(r1.message)
    s2.request(r1.from.name) { r2 ->
    println(r2.message)
    }
    }

  • @macc4773
    @macc4773 2 роки тому

    Base knoledge: js and ts.
    Typescript (ts) = ts for Javascript (js)
    Kotlin = ts for Java
    C++ = ts for C.
    scss/sass = ts for css.
    Rust = ts for C++.
    xml = ts for html
    delphi = ts for pascal.
    continue below...

  • @wujacob4642
    @wujacob4642 6 років тому +8

    Great job, master piece. Is the code in the demo available for download anywhere?

  • @brulezjedna2260
    @brulezjedna2260 5 років тому +13

    Can you just please keep the code on the screen all the time, next time? Maybe just have a speaker view contained in the nested screen...This way I had to stop video too many times.

  • @saulalonsopalazuelos9594
    @saulalonsopalazuelos9594 3 роки тому +1

    kotlin lang and lib revived the java ecosystem , multiplatform jetpack compose will make it full stack in the full sense of the word

  • @telurasinmontasik2406
    @telurasinmontasik2406 Рік тому

    great...I hope there are another videos explaining kotlin like this

  • @aritrabhuiya5908
    @aritrabhuiya5908 3 роки тому +1

    Kotlin: You still need to add an extra line to return more than one variable.
    Python: Learn from me....

    • @janecki2470
      @janecki2470 3 роки тому +4

      You can return pair and it would work just like in python if i remember correctly

  • @jaloveast1k
    @jaloveast1k 4 роки тому +4

    10:28 seems like not as great of an idea.. kinda reminds me of "don't use global in JavaScript", even tho I haven't touched js for like a decade.
    Like, for me it seems natural to encapsulate functions into groups based on what they are doing. Can't imagine trying to remember what exactly is the name of one of thousands functions in your project.
    While if they were in a class e.g. StringUtils, you can just write the class name, put a dot and scroll through the functions inside it, "oh that's the one I was looking for".

    • @nickbanderson
      @nickbanderson 4 роки тому +4

      Here is response from jetbrains team on that question: discuss.kotlinlang.org/t/best-practices-for-top-level-declarations/2198

  • @slaviboy
    @slaviboy 3 роки тому +1

    Kotlin is just a blessing ✌😁

  • @moonna8088
    @moonna8088 4 роки тому +1

    Im Learning Kotlin to develop android apps to replace legacy code written to run in Telnet within our multivalued DB.
    The android apps will be used on RF Guns to control Stocks in a warehouse.

  • @eatthepi
    @eatthepi 6 років тому +4

    The coroutine stuff went over my head lol. What exactly do all those keywords (high level functions, I guess) do? How do I make sure I'm not leaking a reference to my activity? Can I cancel the blocking thing?

  • @yaush_
    @yaush_ 2 роки тому +1

    It's really frustrating that this keeps cutting around. I would really like to just see the demo the whole time

  • @beginnereasy
    @beginnereasy 2 роки тому +2

    I came here looking for a 101 to make my game and my head is spinning from those tutorials what in the f.

  • @SergeyRyabenko
    @SergeyRyabenko 3 місяці тому

    Kotlin is the best language ever created.

  • @Pulkit__7
    @Pulkit__7 5 років тому +2

    Whenever he said, do you have questions? I always had one, and I remember he is in my phone not live :P

  • @YMARihab
    @YMARihab 5 років тому +2

    do I have to learn or have some idea about java beforehand.

    • @juliet0001
      @juliet0001 5 років тому +1

      Kotlin's semantics are not tied to the jvm, but some oop experience is helpful

  • @LiranBarsisa
    @LiranBarsisa 6 років тому +2

    Some comments:
    13:13 The property won't allow you to use a different separator though, right?
    23:32 The number "3" isn't even...
    24:07 This "println" print "null" in case you give it null value. Any way to avoid this in a short way, and print only if it's not null?
    26:34 Any way to convert to normal code instead of lambda? Sometimes it's clearer and seem more flexible...

    • @Minwol
      @Minwol 5 років тому +7

      Continue using Java everyone else will move on and benefit from Kotlin. You are the same person from last year who thinks constant null checks are a benefit.

  • @beginnereasy
    @beginnereasy 2 роки тому +1

    I'll just make an interface between transcendental super consciousness in real life and people will see what it thinks like a movie and it could even do miracles.

  • @SayIdie
    @SayIdie 4 роки тому +1

    this man is walking documentation

  • @veerhan184
    @veerhan184 5 років тому +1

    Kotlin saves my time, I love it.

  • @arunavkhare2733
    @arunavkhare2733 3 роки тому

    Kotlin many features which were missing in Java and are already in C#.

  • @TheAncientss
    @TheAncientss 4 роки тому

    Feedback: When the camera shows Andre, sometimes it happens while he edits the code. This should not happen, as it can be confusing.

  • @rohanpal1748
    @rohanpal1748 6 років тому +2

    I am new to code. I don't get this actually. What should I know before Kotlin!?

    • @Minwol
      @Minwol 5 років тому +18

      @Hamad AlMarri Exact opposite, you will not want to go back to Java

  • @roiamiel7719
    @roiamiel7719 6 років тому +10

    21:02How did he duplicate the cursor?

    • @szymonwysocki1110
      @szymonwysocki1110 6 років тому +5

      Hold alt & drag

    • @teekdog7884
      @teekdog7884 6 років тому +3

      www.jetbrains.com/help/rider/Multicursor.html
      Ctrl + up/down arrow key (win/linux)
      Alt + up/down arrow key (osx)

    • @java3038
      @java3038 6 років тому +2

      There's multiple ways: www.vojtechruzicka.com/intellij-idea-tips-tricks-multiple-cursors/

    • @francoislegrand1949
      @francoislegrand1949 6 років тому

      alt + vertical selection

  • @micahchurch5733
    @micahchurch5733 5 років тому

    I sorta know kotlin still learning tho si cant articulate likes and dislike too well yet. But idk if I want short dev time as a python and c c++ guy I'll just go with python I feel you need an ide with java and kotlin because there is so much overhead, extension functions are really nice tho

  • @sanikavanjari9204
    @sanikavanjari9204 4 роки тому

    Great session, thanks a lot!!

  • @alvaro1728
    @alvaro1728 11 місяців тому

    Wow, this is so similar to Scala.

  • @KotlinTv
    @KotlinTv 4 роки тому

    Great Content keep it up bro!

  • @fahidsarker4858
    @fahidsarker4858 3 роки тому +1

    Love the language.

  • @witoldsienski1709
    @witoldsienski1709 6 років тому +4

    Many reasons to switch to Kotlin :) !

  • @rahulkesharvani9232
    @rahulkesharvani9232 4 роки тому +1

    very useful sir

  • @technics6215
    @technics6215 Рік тому +1

    Smells a bit like mix of Java, C#, PHP and some functional languages. I see many good things, but I see few chaotic parts of language, at least from my C-like language background.

  • @avirias
    @avirias 4 роки тому +3

    He's just using Kotlin idioms and decreasing line of code

  • @dwaynesands6382
    @dwaynesands6382 4 роки тому +3

    I hear birds in the background

  • @ranyalbegwein7470
    @ranyalbegwein7470 5 років тому +1

    The return type of a function is located at the end of a line, which is one of the first things I would like to see when I read an API.

  • @adrianharo6586
    @adrianharo6586 5 років тому +1

    I just don't understand why there are so many software engineers writing kotlin code on Mac computers, am I the only one who notices this ?

    • @Parker8752
      @Parker8752 4 роки тому +3

      If you write mobile applications, there's a good chance you need to code for iOS too, which means a mac.

  • @ogradus
    @ogradus 3 роки тому

    I wish he would commented out the code, rather than delete it. It would be much easier to compare the different

  • @danmurad8080
    @danmurad8080 6 років тому +3

    How is this an improvement over Scala?

    • @HoD999x
      @HoD999x 5 років тому

      abstractable properties + the null "?" thing don't exist in scala

    • @cheeseheadtothe
      @cheeseheadtothe 5 років тому

      Extension functions are easier to understand than type wrappers. I also like that Kotlin does NOT have implicits IMO. Kotlin has even better interop w/ Java because it uses more of the same underlying classes.

  • @-no-handle
    @-no-handle 6 років тому +66

    I don't understand this fight of 'which language lets you write shorter code'. I still find Java more readable.

    • @chadr76
      @chadr76 6 років тому +15

      Agreed. Did we really need 'fun'?

    • @tejasjoshi6036
      @tejasjoshi6036 5 років тому

      agree

    • @protaties
      @protaties 5 років тому +33

      Readability doesn't mean writing lots of "public static void" or for-loop, it means that you write exactly what you mean. For example, you want to create a new list with each element is two times the element in another list. In Java, you need to do something like `List a = new List(b.size()); for (int i = 0; i < b.size(); ++i) b[i] = a[i] * 2;`. But in Kotlin you only need `val a = b.map { it * 2}.toList;`. And Kotlin version is more readable because it exactly describes what I want to do: creates a new list with each element times 2, but in Java, you need to understand the whole `new` and `for-loop` thing. For more complex logic, it's more difficult to understand what you really mean, i.e. less readability.
      You may say Java 8 supports lambda function and streams. Yes, Java 8 makes things better, but not good enough.

    • @pgmz
      @pgmz 5 років тому +14

      I think the real motivation of pushing kotlin so much, is because of the legal issues Android is facing against Oracle because of Java usage.

    • @eternalkaori2314
      @eternalkaori2314 5 років тому +5

      @@protaties Exactly, Java gets bloated and clunky with all the boilerplate, I'm getting into kotlin primarily because they are addressing some of the frequent annoyances that come with writing code. I mean just look at the lazy initialization example he gave, its a prime example why kotlin is great.

  • @bhavyachampaneri
    @bhavyachampaneri 3 роки тому +2

    Rip getters and setters and huge line of java code 🙂😂

  • @yuruar
    @yuruar Рік тому

    Kotlin великолепен, конечно.

  • @mio7545
    @mio7545 6 років тому +1

    how can i get these codes

  • @Baannia
    @Baannia 6 років тому +29

    Kotlin looks like Swift sometimes for me.

    • @areebjamaliam
      @areebjamaliam 6 років тому +6

      They are very similar and for a good reason

    • @sobanya_228
      @sobanya_228 6 років тому +3

      It is actually almost 100% Scala, which also influenced Swift

    • @areebjamaliam
      @areebjamaliam 6 років тому +1

      Sobanya nope

    • @palvarga2833
      @palvarga2833 6 років тому

      I have no EXP in scala, but according to your comment you do. So lemme ask a question. I belive Java is a bit outdated langauge, my original tought was that C# will eventually take over Java's throne, but now seeing Kotlin I kinda changed my mind. However when you said that is almost 100% Scala I ahve my doubts, since up until recently I have not even heard of Scala. So someone liek you who have seen all of these languages do you think Kotlin has a shot taking over java ? I belive Java will decline in the near future eventually.

    • @chadr76
      @chadr76 6 років тому +3

      Swift is garbage.

  • @klarnorbert
    @klarnorbert 3 роки тому

    I'm having fun programming in Kotlin, and that couldn't be said about Java.

  • @inbuckswetrust7357
    @inbuckswetrust7357 4 роки тому

    It's time to make a film: forward to the past :)

  • @Aweklin
    @Aweklin 4 роки тому

    How do I pass obj by ref to fun in Kotlin?

    • @algoseekee
      @algoseekee 3 роки тому +1

      They are all passed by ref by design, you'd have to make a copy if you wanted to pass "by value".

  • @dislike__button
    @dislike__button 4 роки тому +9

    I don't like Kotlin, it always suspends fun

  • @QoiniOfficial
    @QoiniOfficial 5 років тому +4

    Did we really need 'fun'?

    • @wesosdequeso8360
      @wesosdequeso8360 5 років тому +1

      😡 no fun 😡

    • @narm455
      @narm455 5 років тому

      No

    • @connectedr
      @connectedr 5 років тому

      Yes, because it would conflict with the syntax of a funcion with a single lambda argument

    • @gcm4312
      @gcm4312 5 років тому

      'fun' and ?: make Kotlin awesome

  • @josemarcarvalho9641
    @josemarcarvalho9641 4 роки тому +1

    very goob, this is an on big langague, I`m liked this

  • @Skillabstinenz
    @Skillabstinenz 5 років тому

    What IDE is he using?

  • @jiancanchen1352
    @jiancanchen1352 6 років тому +14

    pythonic! great

  • @johnny_rain3226
    @johnny_rain3226 2 роки тому +1

    Almost good as C#

  • @this-is-bioman
    @this-is-bioman 8 місяців тому

    You've let him talk about basic stuff that one can read by himself in the documentation? I had hoped it would have more depth and would _reveal_ some interesting internal Kotlin things or how they made particular design decisions etc. Disappointing.

  • @slaviboy
    @slaviboy 4 роки тому +2

    Hey, can you send me a Kotlin t-shirt :D

  • @MudassirZulfiqar
    @MudassirZulfiqar 6 років тому +13

    I was expecting Hadi hariri

  • @JorgeEscobarMX
    @JorgeEscobarMX 4 роки тому

    If I already know Java, why would I learn yet another programming language to do the same stuff in a different way?

  • @msjastad
    @msjastad 5 років тому +1

    What is this ide???

    • @danielbubenheim5951
      @danielbubenheim5951 5 років тому +1

      Of course it's IntelliJ IDEA by JetBrains: www.jetbrains.com/idea/

  • @stevebuddy6827
    @stevebuddy6827 5 років тому +2

    Umm... Can I have my C#/Java language back now?

  • @i-am-in-cloud
    @i-am-in-cloud 3 роки тому

    Thats copied from namedtuple in python

  • @slaviboy
    @slaviboy 5 років тому +2

    Kotlin rocks

  • @pippop9583
    @pippop9583 6 років тому +1

    Closely to Swift style

  • @hdkloh6857
    @hdkloh6857 5 років тому

    Wait take a break n tell...

  • @DeLL116
    @DeLL116 5 років тому +7

    Over-analyzing with developer paranoia :
    Google Big Boss - "How do we get developers to start writing apps for Fuscia with Flutter and Dart?
    Google Smaller Big Boss - "Introduce a new programming language to Android that's "better", but also "annoying"!
    Google Big Boss - "Do it."

  • @johnyeager8355
    @johnyeager8355 3 роки тому

    Ok

  • @paolo_in_corsivo
    @paolo_in_corsivo 6 років тому

    very nice!

  • @DigimonGaara
    @DigimonGaara 2 роки тому +2

    Sorry, i didn't liked Kotlin. i will keep with Java, there's no real reason to change.

  • @enriquemartindelpomarleon
    @enriquemartindelpomarleon 4 роки тому

    TRANSLATE TO SPANISH PLS!

  • @DeLL116
    @DeLL116 5 років тому +1

    Me @ 11:51 (look to the bottom right)

  • @skin4813
    @skin4813 2 роки тому

    Now, I create a 100.000 threads. Looks at the audience as a bad boy.

  • @ZelenoJabko
    @ZelenoJabko 3 роки тому +1

    Kotlin was inspired by Scala. Or in other words, it stole most of Scala's ideas.

  • @stevewinnett8875
    @stevewinnett8875 4 роки тому

    👍

  • @hjanehferj9048
    @hjanehferj9048 3 роки тому

    😊😀👍

  • @mayo2001
    @mayo2001 6 років тому

    Interestingly Kotlin didn't seem to learn javascript mistakes, like extension functions is similar to overriding prototype in javascript (do you remember prototype lib). But today considered as antipattern, because overriding prototype is dangerous.

    • @Tevinsmind
      @Tevinsmind 6 років тому +8

      Kotlin is compiled and statically typed, which eliminations many of the problems of JS prototypes.

    • @zadintuvas1
      @zadintuvas1 6 років тому +11

      Extension functions don't "override" anything. It's just a syntactic sugar. First, you need to import extension functions to be able to use them. Second, when you are declaring extension function on, let's say, String class, you are not changing the class itself, you just get a nice way to invoke your method. So you are not affecting any other code which uses String (unlike in javascript) and different libraries can have their own extension functions (even with the same name) and things are still going to work.
      In essence, declaring extension function on String just creates a class StringKt with that method inside and the compiler replaces invocation "John Doe".getFirstWord() with StringKt.getFirstWord("John Doe") behind the scenes.

    • @igorg.8624
      @igorg.8624 6 років тому +2

      What do Kotlin Extension Functions have to do with Javascript??