Pablo Ripolles wrote:
Hello all!

I assume many of you already know about ATS...

I'd like to know your thoughts about it!

Some interesting references are:
http://www.ats-lang.org/
http://www.reddit.com/r/programming/comments/72hmw/language_shootout_ats_is_the_new_top_gunslinger/

it is damn fast!
http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=all

Cheers!



fun fib4 {n:nat} (x: int n): [r:int] (FIB (n, r) | int r) = let
  fun loop {i,j:nat | i+j == n} {r0,r1:int}
(pf0: FIB (j, r0), pf1: FIB (j+1, r1) | x: int i, a0: int r0, a1: int r1)
    : [r:int] (FIB (n, r) | int r) =
    if x > 0 then loop (pf1, FIB_ind (pf0, pf1) | x-1, a1, a0 + a1)
    else (pf0 | a0)
in
  loop (FIB_bas_0 (), FIB_bas_1 () | x, 0, 1)
end // end of [fib4]


No thanks, I'd rather program in assembly. :(

Reply via email to