ah. also:

val ex1 = (arrayref)$arrpsz{arrayref(int, 4)}(a, b, c) where {
  val a = (arrayref)$arrpsz{int}(5, 1, 9, 5)
  val b = (arrayref)$arrpsz{int}(7, 5, 3, 0)
  val c = (arrayref)$arrpsz{int}(2, 4, 6, 8)
}

is there a nicer way to include a matrix in an ATS2 program than this?

One might prefer to define the table in the target language, even C:

%{
int ex1[3][4] = {{5, 1, 9, 5},
                 {7, 5, 3, 0},
                 {2, 4, 6, 8}};
%}
val ex1 = $extval(arrayref(arrayref(int, 4), 3), "ex1")


Going as far as having a nice literal syntax for hash tables would fit the 
expectations of a Ruby/JS/&c hacker.

On Friday, February 9, 2018 at 12:15:22 PM UTC-6, gmhwxi wrote:
>
> For the moment, I just want to open a thread for ATS3.
>
> I decided to pick ATS/Xanadu for the full project name. I like the name 
> Xanadu
> because it is poetic and brings a feel of exoticness.
>
> ATS3 is supposed to be compiled to ATS2. At least at the beginning. I will 
> try to
> write more about what I have in mind regarding ATS3.
>
> I know that a lot of people have been complaining about the syntax of 
> ATS2. So
> we can start the effort of designing some "nice" syntax for ATS3. Please 
> feel free
> to post here if you would like share your opinions and ideas.
>
> I will be happy to take the lead but we definitely need to have some form 
> of community
> effort on this project given its size and scope.
>
> Cheers!
>
> --Hongwei
>
> PS: I felt rushed every time up to now when implementing ATS. This time I 
> am hoping
> to have the luxury of thinking about implementation a bit before actually 
> doing it :)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ats-lang-users+unsubscr...@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/f6fd9fb0-97bd-4c11-9f32-6dcc8f223f1e%40googlegroups.com.

Reply via email to