In this blog post
(http://roscidus.com/blog/blog/2013/06/09/choosing-a-python-replacement-for-0install/#ease-of-writing)
the author wrote that it took several hundred lines of ATS code to do what
it took OCaml or Haskell a few lines to do. But he went on to state that
"it looks like this won’t be needed in ATS 2". Is ATS really that verbose?
Has the situation changed in ATS2? If the code used in that blog post were
rewritten in ATS2 would it be substantially shorter than a few hundred
lines?
The comments here ( Reddit - Dive into anything)
state that ATS only has limited support for dependent type. Is that
correct? If so what features are missing? How does ATS compare to Agda or
Idris in terms of dependent type?
Basically, programs cannot be used to construct types in ATS.
For instance, the following function declaration is not allowed in ATS:
fun add (x: int, y: int): int(x + y)
In the type int(x+y), x+y is not static; it is a piece of program.
In ATS, one can do
fun add{i,j:int} (x:int(i), y:int(j)): int(i+j)
where int(i) and int(j) are singleton types for integers equal to i and j,
respectively.
In this blog post ( Replacing Python: candidates - Thomas Leonard's blog)
the author wrote that it took several hundred lines of ATS code to do what
it took OCaml or Haskell a few lines to do. But he went on to state that
“it looks like this won’t be needed in ATS 2”. Is ATS really that verbose?
Has the situation changed in ATS2? If the code used in that blog post were
rewritten in ATS2 would it be substantially shorter than a few hundred
lines?
It really depends how you write a program. If it takes OCaml a few lines,
then I think one can do it using a few lines in ATS (and ATS2) as well.
If you want more safety guarantee, then you may need to write more lines.
Also, handling errors is a very big issue when writing such code. Usually,
“short” programs do not report error messages adequately.On Friday, July 25, 2014 9:49:10 AM UTC-4, Andy wrote:
Hi. New to ATS. I was reading about ATS and have some general questions:
The comments here ( Reddit - Dive into anything)
state that ATS only has limited support for dependent type. Is that
correct? If so what features are missing? How does ATS compare to Agda or
Idris in terms of dependent type?
In this blog post ( Replacing Python: candidates - Thomas Leonard's blog)
the author wrote that it took several hundred lines of ATS code to do what
it took OCaml or Haskell a few lines to do. But he went on to state that
“it looks like this won’t be needed in ATS 2”. Is ATS really that verbose?
Has the situation changed in ATS2? If the code used in that blog post were
rewritten in ATS2 would it be substantially shorter than a few hundred
lines?