I did manage to run some JS code generated from ATS in a React-native
project (for printing out factorial numbers). I was actually able to load in the
entire libatscc2js library, and I wrote the factorial function in CPS-style:
//
implement
fact(n) = kfact(n, lam(res) => res)
//
implement
kfact(n, k) =
if
(n > 0)
then kfact(n-1, lam(res) => k(n*res)) else k(1)
//
I will post my code once I can get something more interesting.
In the long run, it may make even more sense to transpile ATS into
Java (instead of JavaScript) for targeting Android.
ATS can already be used with Objective-C. So targeting iOS is
already within reach. One just needs to figure out a way to stream-line it.
Cheers!