You can compile Kotlin to Javascript

Поделиться
HTML-код
  • Опубликовано: 22 ноя 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.

  • @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 👏

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

  • @wlockuz4467
    @wlockuz4467 9 месяцев назад +2

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

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

  • @pkop4
    @pkop4 9 месяцев назад +5

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

  • @brisson4993
    @brisson4993 9 месяцев назад +1

    I've been loving your videos!! Keep up

  • @dleonardo3238
    @dleonardo3238 9 месяцев назад +8

    have you tried compose multiplatform?

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

  • @wesley2453
    @wesley2453 9 месяцев назад

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

  • @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)

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

  • @minutesock9649
    @minutesock9649 9 месяцев назад

    I am curious about compose multiplatform targeting the web

  • @devatrii
    @devatrii 9 месяцев назад

    🔥🔥

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

  • @landsman737
    @landsman737 9 месяцев назад

    what about thymeleaf?

  • @zhonxina2800
    @zhonxina2800 6 месяцев назад

    what IDE do you use ?

  • @replikvltyoutube3727
    @replikvltyoutube3727 9 месяцев назад +1

    I wish I could use kotlin for Jenkinsfiles..

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

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

  • @JinseokSeo-p8q
    @JinseokSeo-p8q 9 месяцев назад

    But why though.....

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

  • @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 8 месяцев назад

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

    • @developerkang3717
      @developerkang3717 8 месяцев назад +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.