Strukt alternatives and similar libraries
Based on the "Misc" category.
Alternatively, view Strukt alternatives based on common mentions on social networks and blogs.
-
jclasslib
jclasslib bytecode editor is a tool that visualizes all aspects of compiled Java class files and the contained bytecode. -
kotlin-logging
Lightweight Multiplatform logging framework for Kotlin. A convenient and performant logging facade. -
lingua
The most accurate natural language detection library for Java and the JVM, suitable for long and short text alike -
Kotlift
DISCONTINUED. Kotlift is the first source-to-source language transpiler from Kotlin to Swift -
Humanizer.jvm
Humanizer.jvm meets all your jvm needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities. -
klutter
A mix of random small libraries for Kotlin, the smallest reside here until big enough for their own repository. -
solr-undertow
Solr / SolrCloud running in high performance server - tiny, fast startup, simple to configure, easy deployment without an application server. -
kassava
This library provides some useful kotlin extension functions for implementing toString(), hashCode() and equals() without all of the boilerplate. -
SimpleDNN
SimpleDNN is a machine learning lightweight open-source library written in Kotlin designed to support relevant neural network architectures in natural language processing tasks -
kasechange
๐ซ๐๐ข๐ ฟ Multiplatform Kotlin library to convert strings between various case formats including Camel Case, Snake Case, Pascal Case and Kebab Case -
kotlin-futures
A collections of extension functions to make the JVM Future, CompletableFuture, ListenableFuture API more functional and Kotlin like. -
PrimeCalendar
PrimeCalendar provides all of the java.util.Calendar functionalities for Persian, Hijri, and ... dates. It is also possible to convert dates to each other. -
log4k
Lightweight logging library for Kotlin/Multiplatform. Supports Android, iOS, JavaScript and plain JVM environments.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Strukt or a related project?
README
Strukt
C-style structs on the JVM!
ZERO garbage, ZERO reflection, ZERO maps. EASY to use, and with INCREDIBLE performance.
WARNING: This library is more of a proof-of-concept, and is extremely experimental and untested. DO NOT USE IN PRODUCTION!
New! Now fully supported across all JVM languages!
Gradle
compile group: 'org.jire.strukt', name: 'strukt', version: '1.2.0'
Maven
<dependency>
<groupId>org.jire.strukt</groupId>
<artifactId>strukt</artifactId>
<version>1.2.0</version>
</dependency>
Declaring a Strukt
The declaration syntax is very similar to regular classes, except:
- You should declare as an
object
, rather thanclass
- Members should be delegated by a subclass of
StruktMember
- You must extend
Strukt
For example, a Strukt for representing a coordinate might look like:
object Point : Strukt() {
var x by 0
var y by 0
}
There are member delegates built in for all primitives besides char.
You can also specify a default value for your member, like so:
var x by 3 // 3 is the default value
var y by 5 // 5 is the default value, shown with named arguments
Allocating a reference
The syntax for allocation is a bit different than regular object construction. Instead, you use the invoke operator to set values.
For the above Point example, this might look like:
val example = Point { x = 3; y = 5 }
If you wanted to make use of default arguments, you can omit the sets.
val example = Point {}
Allocating a reference automatically sets the reference pointer. (More on this in the following section.)
Accessing members
Accessing members is the farthest deviation from regular object syntax.
It is important to understand under the hood, Strukt uses something called a reference pointer to keep track of what reference is currently being worked on.
Switching to a reference pointer is done through the get operator on the Strukt's type.
This might look like this:
Point[example]
In full effect, the Point example might be used like this:
Point[example].y = 20
println("x: ${Point[example].x}, y: ${Point[example].y}") // prints "x: 3, y: 20"
Since the switch (get) operator switches the reference pointer, you can write a shorthand version by referring to the type (Point in our example) directly.
This might look like:
Point[example].x = 123 // `Point[example]` sets the reference pointer...
println("x: ${Point.x}, y: ${Point.y}") // so `Point.x` and `Point.y` can be referred to directly
*Note that all licence references and agreements mentioned in the Strukt README section above
are relevant to that project's source code only.