Re: [ats-lang-users] New to ATS
Unleashing the potentials of types and templates
Status: Beta
Brought to you by:
ats-hwxi
From: Likai L. <li...@cs...> - 2010-03-14 21:48:40
|
ATS differs from ML most notably: 1. You'll be writing a lot of type annotations. The amount you write depends on how you declared the type definition. The more precisely you specify the code's behavior through types, the better the ATS compiler can help you verify correctness. However, it takes a few years of experience to know exactly how much you need to write. Overdoing it will certainly make it a frustrating learning experience. It can be a real productivity killer. For now, you may start annotating ML-styled code in ATS, and it is just like ML. 2. ATS doesn't have a nice module system like ML does; there is no functor support. But the #include trick often used in C also works in ATS. 3. To start taking advantage of advanced ATS features like flat types (t@ype with a funky @), stack allocated storage, and linear views, you might want to consider writing functional-styled programs in C first, then you'd come to appreciate it better. GCC can do tail call optimization in C/C++, although ATS does its own tail call before generating C code. Also, I'm not sure whether the efficiency of the host language really matters for writing a compiler. I thought the code your compiler generates would be more important. You could probably start prototyping in O'Caml and Haskell and rewrite in ATS later. As long as you stay within the confines of mini ML, the port should be easy. liulk On Sun, Mar 14, 2010 at 2:09 AM, Rouan van Dalen <rv...@ya...> wrote: > Hi everyone. > > > I have stumbled onto ATS because I am interrested in non-main stream programming languages and love to try > out interresting ones. > > As I have no experience in ATS and I can't find too many blogs about it, I have a few questions. > > 1. Would you say that ATS is ready for writing applications outside the academic environment? > > 2. How expressive is its type-system, compared to say OCaml / Haskell? > > ATS seems like a language where I can write in a functional style (which I really like) and it seems > that ATS can be used to write fairly efficient code. > > I am looking to invest some substantial time into ATS if I can use it for more practical, real-world > programming. > > I am looking for a good, efficient language to write a compiler for my own programming language. > I am hoping that ATS will be this language. Can anyone advise if ATS is a good language for > this purpose and if there are any specific features of ATS that would come in handy for writing > a compiler in ATS. > > > Regards > > Rouan |