Repository navigation
0.1.0
Today, the 11th of January 2024 is Marcel's birthday!
This new release brings a whole new clean implementation of Marcel Lang. It also provides new features and bugfixes
Do while
int i = 15
do {
println(i++)
} while (i < 10)Full doc here.
Iterating over maps
Map m = [foo: 1, bar: 2]
for ((String key, int value) in m) println("$key=$value")Full doc here.
Single statement functions
fun int sum(int a, int b) -> a + bFull doc here
Varargs method calls
You can now call varags method as you would in Java
String.join(",", "s1", "s2") == String.join(",", ["s1", "s2"] as CharSequence[])
String.join(",") == String.join(",", [] as CharSequence[])Meta annotations
Marcel now brings in its standard library useful annotations allowing to generate boiler-plate code (see full doc here)
it provides 3 meta-annotations
@stringifywhich autogenerates an object'stoStringmethod based on its properties@datawhich autogenerates theequalsandhashCodemethods based on the object's properties@comparablewhich makes the object implement Comparable and use its properties to make the comparison@lazywhich makes the annotated property lazy (lazy initialization)@cachedwhich caches the results of the annotated method using the method arguments as the cache key