Devs.site

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


Code

    implement 
    main0 () = print("Hello, world!\n")

    // So much code :)

Try it


Requirements


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

0 comments

Specify your e-mail if you want to receive notifications about new comments and replies