Values of a datatype is boxed. In compiler terminology, such values are
referred to as boxed tagged union. Here is an example that may shed some 
light:

http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/HTMLTOC/x2223.html

Yes, lists in ATS are the same as singly-linked lists in C.

>>Are arrays the preferred way to get performance?

Compared to lists, arrays certainly can give you more performance.
The rule of thumb for performance is that you get more performance if
you have more "flatness" in your data.

By the way, real-time systems are primarily concerned with responsiveness
(not performance).

Sorry for lack of documentation. I can only be focusing on implementing ATS3
right now :)


On Sunday, February 2, 2020 at 8:04:32 PM UTC-5, rodol wrote:
>
> I am trying to understand exactly how ATS internals work.
>
> I don't understand how the datatypes work. Are they like named unboxed 
> tuples,
> essentially? Or are they boxed? I assume they are unboxed, but then I have 
> trouble
> understanding how lists work, since they would be like a bunch of nested 
> unboxed
> tuples. Which would be problematic since they'd be passed by value, and 
> large lists
> would have bad performance. On the other hand, if datatypes are boxed, 
> then lists
> would be like linked lists, and wouldn't be linear in memory so...
>
> Are arrays the preferred way to get performance?
>
> Is there something I can read that explain this part of ATS?
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/05d81e79-a577-432e-9260-3fa67bcd8b51%40googlegroups.com.

Reply via email to