![]() ![]() ![]() This is evident from the fact that Android Studio comes with inbuilt support for Kotlin, as it has for Java. Similar to Java, Kotlin has become a top choice for developing Android applications. To start using Kotlin for JavaScript, please refer to Set up a Kotlin/JS project.You can also complete a tutorial to work through or check out the list of Kotlin/JS sample projects for inspiration. Kotlin is a cross-platform, statically typed, general-purpose language developed by JetBrains. Hope it helps, and others may have smarter things to say than I can. If youre new to Kotlin, a good first step is to familiarize yourself with the basic syntax of the language. That's the start of some analysis anyway. I'd also want to compare the final JS output sizes (I suspect fritz will do better here)įrom their demo examples, fritz has one line which feels like it might be easy to forget to do sometimes: changes.values() handledBy store.update which in Compose you'd instead create some mutable state in your method and just set it and things would magically propagate.Īt the same time, a huge disadvantage to compiler plugins is now your code needs to be tied down to a specific version of Kotlin. I'd be curious what more complex fritz projects look like and how well fritz handles stepping over branches of code that haven't changed (which is something Compose is supposed to shine at). I assume the general goals for both libraries is the same, as you are guessing. This short series was originally written for the Android world to explain the fundamental idea behind Compose, but I still think it's an interesting read for all developers who want to understand it, especially part 2.Īs for timing, looks like fritz2 started getting releases around the beginning of 2020, while C4W was announced in 2021 if I recall. This allows some reduction of boilerplate and probably handles some cases more concisely than a library without being a compiler plugin can. I haven't used Fritz, but much of the power of Compose comes from the fact it's a compiler plugin, and adds extra information to your method calls at compile time. ![]()
0 Comments
Leave a Reply. |