Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/examples/tuples.nct

tuples.nct

use std/io

func initial_statistics(): (String, usize) {
    return (String "Nocter", 32)
}

func main(): i32! {
    var statistics = initial_statistics()
    statistics.1 += 1
    let _ = (7, 8).0
    let (temporary, _) = (String "kept", String "discarded")
    drop temporary
    let (name, milestone) = move statistics
    let message = "${name} structural tuples: v0.${milestone}.0\n"
    io.print(&message)?
    return 0
}