Hello World in ATS/Postiats
Get started with ATS2, this language refined for low memory usage and safe programs. Build the typical Hello World application and learn how you install the compiler on Linux
ATS2 aims to be an interesting choice for those looking to build high-quality software with minimum need for debugging, by enforcing precision and providing a well constructed type system, both dependent and linear types being available.
Have a look at how many lines of code you need to show the Hello World message.
We will use the ATS2/Postiats compiler, which is written in ARS1 and has to be compiled and installed first
implement main0 () = print("Hello, world!\n") // So much code :)
- The GCC compiler to build ATS2
- The GMP library
- The GNUNet library
- Build the ATS2 patscc compiler as described in Instructions
After building the compiler by following the simple instructions on their site
Open archive, configure and install
tar -zvxf ATS2-Postiats-x.x.x.tgz ./configure && make all make install
Create the .dats file, copy the code inside and compile with
patscc -o helloworld helloworld.dats