Create Kotlin extension library for Javalin
See original GitHub issueThere are lots of Kotlin guys that don’t like some parts of the syntax Javalin has. The extension library is just a bunch of different functions to allow more Kotlin-like syntax.
Example from #150 :
Current Kotlin code:
ctx.paramMap()["id"]?.let {
...
}
Extension function:
val Context.params: Map<String, String> = this.paramMap()
ctx.params["id"].let { }
The library could be supplied as a separate artifact (eg io.javalin.k-javalin or so) to not bother the Java users.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Documentation - A lightweight Java and Kotlin web framework
Javalin - A lightweight Java and Kotlin web framework. Create REST APIs in Java or Kotlin easily.
Read more >Building a Kotlin extensions library - Android Developers
In this codelab, you'll build your own Kotin extensions library for an API that was originally created in the Java programming language.
Read more >inforion/kotlin-extensions: Library with various ... - GitHub
Library with various extensions and helper functions - GitHub - inforion/kotlin-extensions: Library with various extensions and helper functions.
Read more >Extensions | Kotlin
Extensions do not actually modify the classes they extend. By defining an extension, you are not inserting new members into a class, only...
Read more >Javalin: A Simple, Modern Web Server Framework
Many developers would say Javalin is a library rather than a framework ... in Javalin, unlike in most frameworks, you never extend anything; ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree, though it is not limited to context params only. Will check if the extensions can improve the syntax more significantly, as I am not sure that Javalin will benefit from these (^^^) extensions a lot.
Great, I’ve started thinking that keeping the library consistent across Java and Kotlin is a main goal of the project.