I thought about this issue as well. One idea I had is to use overloading aggressively.
Right now the biggest issue with ATS2, as I see is, is that a non-expert user gets tripped everywhere. For such a user, programming in ATS can hardly be an enjoyable experience. ATS3 tries to put joy back into learning functional programming via ATS. On Wednesday, March 14, 2018 at 7:36:57 AM UTC-4, M88 wrote: > > 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/a77b8e9f-744d-452e-9194-cb8b9cd3df67%40googlegroups.com.