# Boxes tuples/records/etc & gc

**URL:** <https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579>\
**Category:** Google Group\
**Created:** [August 25, 2014, 5:29pm UTC](https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579 "2014-08-25T17:29:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [August 25, 2014, 5:29pm UTC](https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579/1 "2014-08-25T17:29:52Z")

</div>

the docs say that with ! you have to use gc. but couldn’t they be linear?

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [August 25, 2014, 10:54pm UTC](https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579/2 "2014-08-25T22:54:24Z")

</div>

Where did you see it?

‘!’ means call-by-value.

T1 → T2 is just essentially a shorthand for (!T1 \>\> T1) → T2On Monday, August 25, 2014 1:30:12 PM UTC-4, Raoul Duke wrote:

> the docs say that with ! you have to use gc. but couldn’t they be linear?

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [August 26, 2014, 1:05am UTC](https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579/3 "2014-08-26T01:05:29Z")

</div>

Yes, you can if they are linear.

In my own practice, I almost always use dataviewtypes for boxed linear  
tuples.  
Usually, the easy way to go is to use datatypes first and then turn these  
datatypes  
into corresponding dataviewtypes. Supporting this kind of gradual  
transitioning is  
a big strength of ATS; it is part of the support for refinement-based  
programming.On Mon, Aug 25, 2014 at 8:58 PM, Raoul Duke [rao...@gmail.com](mailto:rao...@gmail.com) wrote:

> sorry i was horribly unclear. 🙂 the docs say
> 
> [http://www.ats-lang.org/DOCUMENT/INT2PROGINATS/HTML/x298.html](http://www.ats-lang.org/DOCUMENT/INT2PROGINATS/HTML/x298.html)
> 
> “However, if we want to run code with no support of garbage collection  
> (GC), then we should definitely avoid using boxed tuples.”
> 
> if they were linear, then we could use them even w/out gc, no?
> 
> –  
> 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-user...@googlegroups.com](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](http://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb75qoXm1pXzzdvBoB9siOXqxj94GHYd7HZqDNthCP-GYA%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAJ7XQb75qoXm1pXzzdvBoB9siOXqxj94GHYd7HZqDNthCP-GYA%40mail.gmail.com)  
> .

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [August 26, 2014, 12:58am UTC](https://discourse.ats-lang.org/t/boxes-tuples-records-etc-gc/579/4 "2014-08-26T00:58:36Z")

</div>

sorry i was horribly unclear. 🙂 the docs say

[http://www.ats-lang.org/DOCUMENT/INT2PROGINATS/HTML/x298.html](http://www.ats-lang.org/DOCUMENT/INT2PROGINATS/HTML/x298.html)

“However, if we want to run code with no support of garbage collection  
(GC), then we should definitely avoid using boxed tuples.”

if they were linear, then we could use them even w/out gc, no?
