Skip to content

0.1.0

Choose a tag to compare

@tambapps tambapps released this 11 Jan 14:31
· 811 commits to main since this release

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 + b

Full 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

  • @stringify which autogenerates an object's toString method based on its properties
  • @data which autogenerates the equals and hashCode methods based on the object's properties
  • @comparable which makes the object implement Comparable and use its properties to make the comparison
  • @lazy which makes the annotated property lazy (lazy initialization)
  • @cached which caches the results of the annotated method using the method arguments as the cache key