This is now Hylo
Website | Source | Language tour
Val is an open source, general-purpose programming language designed around on the concept of (mutable) value semantics. The language aims to be safe and efficient, yet expressive enough to support multiple programming paradigms and implement concurrent algorithms safely and efficiently.
Simple program:
subscript longer_of(_ a: inout String, _ b: inout String): String {
if b.count() > a.count() { yield &b } else { yield &a }
}
fun emphasize(_ z: inout String, strength: Int = 1) {
z.append(repeat_element("!", count: strength)))
}
public fun main() {
var (x, y) = ("Hi", "World")
emphasize(&longer_of[&x, &y])
print("${x} ${y}") // "Hi World!"
}
Last modified 18 March 2025