plum
kotlin-script-examples
plum | kotlin-script-examples | |
---|---|---|
6 | 2 | |
592 | 332 | |
1.5% | 0.6% | |
7.0 | 4.1 | |
4 months ago | 13 days ago | |
Python | Kotlin | |
MIT License | 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.
plum
- Plum: Multiple Dispatch in Python
-
Writing Python like it’s Rust
You can use https://github.com/beartype/plum instead of that elif chain too
- GitHub - wesselb/plum: Multiple dispatch in Python
- Plum-dispatch: Julia-inspired multiple dispatch in Python
- Is there any language that is as similar as possible to Python in syntax, readability, and features, but is statically typed?
-
How Julia Uses Multiple Dispatch to Beat Python
Singledispatch is old, dates back to py2: https://docs.python.org/3/library/functools.html#functools.s...
I definitely agree that multiple dispatch is a lot harder :). But most of the examples in the article didn't need it, and it would have been appropriate I think to show equivalent code in Python. All that article did was make me think the author didn't know Python very well.
There are several libraries for multiple dispatch too, for e.g. https://github.com/wesselb/plum
kotlin-script-examples
-
Dotnet Run App.cs
This also exists for Kotlin: https://github.com/Kotlin/kotlin-script-examples/blob/master... (note that the file extension is load bearing in this case, if you don't name it "*.main.kts", it will not work).
It's excellent for writing small scripts/prototyping where you need access to some Kotlin/JVM feature.
Ruby is still my preferred language for small scripts though - the backticks for running external programs is remarkably ergonomic
-
Is there any language that is as similar as possible to Python in syntax, readability, and features, but is statically typed?
+1. Especially useful kts (Kotlin script). It even have notation for dependencies right in script. (https://github.com/Kotlin/kotlin-script-examples/blob/master/jvm/main-kts/scripts/kotlinx-html.main.kts)
What are some alternatives?
dynamic-dns - An automated dynamic DNS solution for Docker and DigitalOcean
runtype - Utilities for run-time type validation and multiple dispatch
Lua - Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
Pomander - Deploy your PHP with PHP. Inspired by Capistrano and Vlad.
fast-sqlite3-inserts - Some bunch of test scripts to generate a SQLite DB with 1B rows in fastest possible way