You can compile Kotlin to Javascript

Поділитися
Вставка
  • Опубліковано 10 лют 2025

КОМЕНТАРІ • 61

  • @David_Box
    @David_Box 11 місяців тому +59

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

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

      Why is that?

    • @kyle8575
      @kyle8575 11 місяців тому +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 11 місяців тому +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 11 місяців тому +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 11 місяців тому +5

      javascript should be illegal

  • @calebpena3729
    @calebpena3729 11 місяців тому +32

    Tom is a genius

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

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

  • @elephant_888
    @elephant_888 11 місяців тому +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.

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

    Great video as always Tom 👏

  • @wlockuz4467
    @wlockuz4467 11 місяців тому +3

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

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

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

  • @guiBri
    @guiBri 11 місяців тому +1

    I've been loving your videos!! Keep up

  • @owlmostdead9492
    @owlmostdead9492 10 місяців тому +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.

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

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

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

    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

  • @quarantedouze9559
    @quarantedouze9559 11 місяців тому +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  11 місяців тому

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

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

    have you tried compose multiplatform?

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

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

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

    how can i learn kotlin if im a java developer

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

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

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

    Thanks Tom! Pretty nice!!

  • @PancakeInvaders
    @PancakeInvaders 11 місяців тому +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  11 місяців тому

      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

  • @erkoxify
    @erkoxify 11 місяців тому +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.

  • @devatrii
    @devatrii 11 місяців тому +1

    🔥🔥

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

    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)

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

    I am curious about compose multiplatform targeting the web

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

    what IDE do you use ?

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

    I wish I could use kotlin for Jenkinsfiles..

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

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

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

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

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

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

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

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

    • @brunojcm
      @brunojcm 11 місяців тому +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.

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

    So JSP -> Kotlin -> JS? Smart!

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

    what about thymeleaf?

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

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

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

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

    • @theshermantanker7043
      @theshermantanker7043 7 місяців тому

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

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

    doesn't kmm require the paid for jetbrains editor 💩

    • @tom-delalande
      @tom-delalande  11 місяців тому +1

      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 11 місяців тому

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

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

    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.

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

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

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

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

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

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

    • @developerkang3717
      @developerkang3717 11 місяців тому +2

      @@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.

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

    But why though.....