You can compile Kotlin to Javascript

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 61

  • @David_Box
    @David_Box 9 місяців тому +58

    The saddest thing in this industry is that the scary part of this title is "Kotlin" instead of "compile to javascript"

    • @h4ktbtw
      @h4ktbtw 9 місяців тому

      Why is that?

    • @kyle8575
      @kyle8575 9 місяців тому +6

      @@h4ktbtwKotlin is JVM, mostly compiled language so it’s inherently faster. There are types, actual, errors, the whole lot. Kotlin is a competent language. JavaScript still has their learners permit. Any JVM language just gets shit on because it’s JVM and the conventions can be lengthy and more abstract. The fact of the matter is it’s still a great language and Kotlin does away with a lot of the boilerplate annoyance you find in Java.

    • @h4ktbtw
      @h4ktbtw 9 місяців тому +6

      @@kyle8575 I mostly agree with you and i really hope that at some point Kotlin moves off of JVM completely. Kotlin/Native is there, but it is not mature enough.

    • @lucaspinazzola5889
      @lucaspinazzola5889 9 місяців тому +1

      They're making a big push for wasm as well. The wasmJs target is pretty nice. Letting you interops with js pretty easily

    • @igoralmeida9136
      @igoralmeida9136 9 місяців тому +4

      javascript should be illegal

  • @calebpena3729
    @calebpena3729 9 місяців тому +31

    Tom is a genius

  • @luisliz
    @luisliz 9 місяців тому +15

    you're for kotlin what primeagen is for rust. Love it.

  • @elephant_888
    @elephant_888 9 місяців тому +5

    I don't really have an interest in writing Kotlin, but this is straight up AWESOME stuff!!
    It definitely makes me think I should look into Kotlin some more.

  • @wlockuz4467
    @wlockuz4467 9 місяців тому +2

    Interesting stuff. I have never used Kotlin outside of Android development but looks like it has matured quite a lot.

  • @beradeep
    @beradeep 9 місяців тому +8

    Can you please make full tutorial on Kotlin and HTMX or Compose Web?

  • @owlmostdead9492
    @owlmostdead9492 8 місяців тому +1

    The reason I am personally hesitant on Kotlin are mainly two things, #1 long compile times and #2 I don't want to be tied to a specific IDE.

  • @edrick_leong
    @edrick_leong 9 місяців тому +4

    Great video as always Tom 👏

  • @brisson4993
    @brisson4993 9 місяців тому +1

    I've been loving your videos!! Keep up

  • @quarantedouze9559
    @quarantedouze9559 9 місяців тому +2

    Having this called when you paste html into idea the same way java gets converted to kotlin would be awesome 👍

    • @tom-delalande
      @tom-delalande  9 місяців тому

      Yes, I actually have no idea who they do that. It would be an interesting project

  • @dleonardo3238
    @dleonardo3238 9 місяців тому +8

    have you tried compose multiplatform?

  • @ilya9343
    @ilya9343 9 місяців тому +7

    I wish I could use Kotlin everywhere (.NET, Unity, Godot)
    I used to only work with Kotlin JVM for Minecraft and fell in love with it

  • @shehapeldien7025
    @shehapeldien7025 9 місяців тому +3

    how can i learn kotlin if im a java developer

    • @tom-delalande
      @tom-delalande  9 місяців тому +2

      A good place to start is a series of short exercises that the Kotlin made. play.kotlinlang.org/koans/overview

  • @pkop4
    @pkop4 9 місяців тому +5

    Show us Kotlin Native server example please. Just found out Kotlin is being used without JVM this is awesome!

  • @wesley2453
    @wesley2453 9 місяців тому

    This is great, Tom is bringing Kotlin to the frontend community.

  • @PancakeInvaders
    @PancakeInvaders 9 місяців тому +1

    Since seeing your kotlin HTML DSL video, I've found a small library called J2HTML that seems to do the same thing without requiring kotlin or ktor. It also has a converter for html->j2html java code. Are you aware of this library, and if so, do you have thoughts on it ?

    • @tom-delalande
      @tom-delalande  9 місяців тому

      I wasn’t aware of this library, I don’t think it’s for me since I enjoy using Kotlin and Ktor. Having a built in converter is great though

  • @juanmadelaflor6406
    @juanmadelaflor6406 9 місяців тому +1

    Thanks Tom! Pretty nice!!

  • @erkoxify
    @erkoxify 9 місяців тому +1

    You should look into python library called dominate. If I understood you correctly in your video that prime shared, dominate does exactly what you built there. Following your ideas, I started building my component library combining daisyUI and python's dominate where I can just take prebuilt components, pass some arbitrary arguments and serve them as html file, all directly in python methods.

  • @corlaez
    @corlaez 8 місяців тому

    I consider myself pro-kotlin (it is my main lang) and I am excited about multi platform.
    That said I think js is the least mature multiplatform and less appealing one due to the fact that it adds a lot of bloat.
    I find that for simple services writting a little bit of js is not the end of the world (especially if you are already using something like htmx to reduce your js needs)

  • @replikvltyoutube3727
    @replikvltyoutube3727 9 місяців тому +1

    I wish I could use kotlin for Jenkinsfiles..

  • @minutesock9649
    @minutesock9649 9 місяців тому

    I am curious about compose multiplatform targeting the web

  • @LeighBriody-i9l
    @LeighBriody-i9l 9 місяців тому

    Great video, any chance you can share your intelij config ? would love mine to look like that , thanks

    • @tom-delalande
      @tom-delalande  9 місяців тому

      I’m pretty sure this is just vanilla. You can enable the new UI in the appearance settings

  • @zhonxina2800
    @zhonxina2800 6 місяців тому

    what IDE do you use ?

  • @floppypaste
    @floppypaste 9 місяців тому +1

    I wish Flutter would use Kotlin instead of Dart or that Kotlin Multiplatform would be as robust as Flutter ...

    • @tom-delalande
      @tom-delalande  9 місяців тому +2

      It's getting there now that they released the ability to build native iOS apps with Kotlin

    • @brunojcm
      @brunojcm 9 місяців тому +3

      I think it's going to be much better than Flutter. It's a solution that's harder to implement, but it produces fully native code without the need for sandboxes or message exchange to interact with the "outside world". My experience with Compose Multiplatform and KMP in general so far has been very good and getting better and more stable every day.

  • @devatrii
    @devatrii 9 місяців тому

    🔥🔥

  • @landsman737
    @landsman737 9 місяців тому

    what about thymeleaf?

  • @kamertonaudiophileplayer847
    @kamertonaudiophileplayer847 9 місяців тому

    So JSP -> Kotlin -> JS? Smart!

  • @griffadev
    @griffadev 9 місяців тому +1

    Cool but, Oh God please dont haunt me with memories of GWT compiling Java to JS and shipping huge ass bundles

    • @kyay10
      @kyay10 9 місяців тому +4

      This is different. It doesn't need to emulate every API that Java has

    • @theshermantanker7043
      @theshermantanker7043 4 місяці тому

      Why compile Java to JavaScript when you have a perfectly capable VM already able to run Java?

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 9 місяців тому

    doesn't kmm require the paid for jetbrains editor 💩

    • @tom-delalande
      @tom-delalande  9 місяців тому

      The editor situation is my least favorite part of Kotlin. But the language is open source and the editor is free. You can just use community edition

    • @brunojcm
      @brunojcm 9 місяців тому

      For KMP and Compose Multiplatform, most people use Android Studio, which is also free (Google subsidises it).

  • @pompiuses
    @pompiuses 9 місяців тому

    This has been possible for years in Java using the GWT Toolkit. For anything but the simplest applications it will end up in an unmaintainable mess. The same goes for Kotlin. If you’re building a professional web front end then there’s no way around it but learning Javascript, html and css the proper way. Use Java or Kotlin for the back end.

  • @JinseokSeo-p8q
    @JinseokSeo-p8q 9 місяців тому

    But why though.....

  • @bodguy1035
    @bodguy1035 9 місяців тому

    I think this is totally unnecessary. why don't just write plain html and javascript? these are more easy than kotlin.

    • @developerkang3717
      @developerkang3717 9 місяців тому

      plain html and js is not type safe. there is so much benefit using kotlin

    • @bodguy1035
      @bodguy1035 9 місяців тому

      @@developerkang3717 but why kotlin? There are lots of type safe language better than kotlin for html and js such as typescript etc.

    • @developerkang3717
      @developerkang3717 9 місяців тому +1

      @@bodguy1035 its depend on your situation. i belive kotlin is way better than typescript. (as syntax level) second thing is that if you are kotlin lover you dont want use other language.