kotlinx-nodejs
KEEP
Our great sponsors
kotlinx-nodejs | KEEP | |
---|---|---|
3 | 60 | |
215 | 3,264 | |
0.0% | 1.6% | |
0.0 | 5.5 | |
over 1 year ago | 7 days ago | |
Kotlin | Markdown | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kotlinx-nodejs
-
Kotlin Team AMA #3: Ask Us Anything
BTW, to get typed declarations for Node.js use https://github.com/Kotlin/kotlinx-nodejs, also, you can just create a project from IntelliJ IDEA Wizard (`Kotlin | Node.js Application`).
For backend development, I'd recommend using Kotlin/JVM, but of cause, you also, can try Kotlin/JS too and a library with typed declarations for Node.js modules could be helpful in this case https://github.com/Kotlin/kotlinx-nodejs. You can simply create a Kotlin/JS project targeting Node.js from IntelliJ IDEA Wizard (Kotlin | Node.js Application).
Honestly, we are mostly focused on generic and browser cases. However recently we have introduced a library with typed declarations for Node.js modules check it out: https://github.com/Kotlin/kotlinx-nodejs. We would happy to hear more about your cases and issues you are faced, please feel free to contact me and file issues at https://kotl.in/issue.
KEEP
-
Project Valhalla: A look inside Java's epic refactor
Nice. So for example, it looks like Kotlin has a nearly identical feature at the language level which will be optimizable when Valhalla ships: https://github.com/Kotlin/KEEP/blob/master/notes/value-class...
> In the future, in a Valhalla-capable JVM, JVM primitive classes will enable efficient representation of Kotlin value classes with an arbitrary number of underlying fields on JVM.
-
Unchecked Java: Say Goodbye to Checked Exceptions Forever
Most other languages agree that checked exceptions are not good by not having them.
As for alternatives, Try/Result and similar monads have decent adoption even in Java, but personally I quite like the Kotlin philosophy [1] to not have generic error containers and either use runtime exceptions or make failures of the return type.
[1] https://github.com/Kotlin/KEEP/blob/master/proposals/stdlib/...
- Is runCatching in use in any of your projects ? My team is abusing it
-
More on OOP: Polymorphism this time
The nitty-gritty is in the KEEP. They show in the end how they considered to add type classes, and then discarded the idea.
-
Making Lenses Practical in Java
Lenses work today. And I think the value class feature will be awesome.
https://github.com/Kotlin/KEEP/blob/master/notes/value-class...
-
Adding Coeffect System to Java with Project Loom
Seems like Kotlin Context Receivers then (https://github.com/Kotlin/KEEP/blob/master/proposals/context-receivers.md).
-
Rust: A Critical Retrospective
Kotlin has value classes. Here's a good overview of how they work in Kotlin: https://github.com/Kotlin/KEEP/blob/master/notes/value-class...
That document is a few years old now and was intended as a design document. But Value classes shipped with Kotlin 1.5. Apparently they are compatible with the project Valhalla value objects that will be added to the JVM at some point. So, this stuff is coming.
I had to look it up because even though I write Kotlin a lot, value classes are not something I have used at all. Looks useful but not that big of a deal and doesn't really solve a problem I have. Data classes and records (in Java) are a bigger deal IMHO.
In practice, the way you deal with immutability in Kotlin is to keep most of your data structures immutable by default unless they need to be mutable. E.g. there's a List and a MutableList interface. Most lists are immutable unless you create a MutableList. Same with val vs. var variables. Val variables can't be reassigned and you kind of use var only by exception when you really have to. The compiler will actually warn you if you do it without good reason. A data class with only vals can't be modified. Java is a bit more sloppy when it comes to mutability semantics. It has records now but all the fields have setters by default. It has var but no val assignments (you can use final to force this but few people do). And so on.
Semantically this is not as strong as what Rust does of course but it's good enough to make e.g. concurrency a lot easier. Mostly, if you avoid having a lot of mutable shared state, that becomes a lot easier.
You could imagine a Kotlin like language with much stronger semantics implementing borrow checking instead of garbage collection. It wouldn't be the same language of course but I don't think it needs to be very different. Using it would not be a massively different.
-
Java record pattern matching in JDK 19
I'd be very interested in a comparison between scala 3 using/given and Kotlin new context receivers https://github.com/Kotlin/KEEP/blob/master/proposals/context...
- Why no one recommends the use of the standard library's Result class but a custom sealed class approach?
-
[Question][Kotlin] Dexter Runtime Permissions development has stopped, whats the alternative?
This will be furthermore simplified with multiple receivers coming very soon
What are some alternatives?
KorGE - KorGE Game Engine. Multiplatform Kotlin Game Engine
ktor - Framework for quickly creating connected applications in Kotlin with minimal effort
htmx - </> htmx - high power tools for HTML
okio - A modern I/O library for Android, Java, and Kotlin Multiplatform.
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
kotlin-power-assert - Kotlin compiler plugin to enable diagrammed function calls in the Kotlin programming language
kotlin-multiplatform-libsodium - A kotlin multiplatform wrapper for libsodium, using directly built libsodium for jvm and native, and libsodium.js for js targets.
koin - Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
Decompose - Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing (navigation) and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.)
swift-evolution - This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.