Not sure if it's feasible or theoretically sound, but it would be nice to see a 
less stark divide between datatypes and dataviewtypes in ATS3. It would be 
great to be able to declare a data structure once and use either linear or gc'd 
versions. 

Maybe this could extend to other types that have a dual linear version (eg 
strptr / string). It seems there are commonly functions that could operate on 
either, and at the moment this is achieved by casting. Perhaps there could be a 
type level attribute for all pointer-based types, like "lin string" / "gc 
string" , which are both also just "string". 

This may also allow for specifying "linearity" in variable declarations, eg 
'let lin val x=Foo(7), y="A linear string" in... '. 

I suppose a similar syntax could make dealing with proof values more concise, 
too (eg, 'let prf val pa=my_proof_fn(), pb=another_proof_fn(pa) in... '). 

-- 
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/c5467efb-603a-4635-a3c7-d4f3840e7165%40googlegroups.com.

Reply via email to