by Jeff Walker
Adamant will be a general-purpose language with high performance, deterministic safe resource management, and guaranteed thread safety.
  • object lifetimes
  • write once, compile anywhere
  • guaranteed optimizations
  • asynchronous everywhere
  • type inference
  • generics with partial specialization
  • class defined traits
  • compile time code execution
  • optional exception specifications
  • ergonomic design
  • minimal runtime library
public fn newer_car[$a](c1: Car$> a, c2: Car$> a) -> Car$< a
{
    return if c1.model_year >= c2.model_year => c1
           else => c2;
}

public fn main() -> int
{
    let c17 = new Car(2017);
    let c18 = new Car(2018);
    let newer = newer_car(c17, c18); // lifetime $a is inferred
    return newer.model_year;
}
Information updated 02/01/19
Note: This entry has not yet been moderated.
View Comments