Hmm is it? I see two possibilities (which I think are different): no more than 1 copy/alias of this exists (uniqueness typing), vs. the caller only gets 1 copy of it. And the latter seems more likely...
Conversation
I want it to be the former :( - why does the latter seem more likely?
1
Well, that's just what it means elsewhere -- how many copies you get to use, not how many exist.
(There was something in the linear haskell paper wrt `forall a. (Foo -o a) -o a)` being an encoding of a linear value; maybe that gets you closer?)
1
yeah, in that thread I was just reading that linearity doesn't get you mutate in place semantics, which is what I really want :/
1
hence me wanty uniqueness as well
1
What stops you from enforcing uniqueness for 1 rather than linearity? Something breaks; or just not clear how?
1
Also IIUC, "linearity" of an arg means "callee may only use it once, caller any number of times", and "uniqueness" is the reverse, "caller may only use it once, callee any number of times", but I think you'd want to restrict both sides? At least Rust works that way...
1
1
Yes, this is what I’m talking about 😅
1
First read about the duality a while back in this link: twitter.com/buggymcbugfix/ - which lead me toasking poor about it, which lead to him sending me the link. 😂
Quote Tweet
Replying to @buggymcbugfix @brendanzab and @dorchard
PS: there is a simple explanation of uniqueness vs linearity here: edsko.net/2017/01/08/lin
1
2
I am looking at this sort of stuff at the moment. I haven’t forgotten you...
1
1
Oh, sorry! Was more thinking you might find our discussion interesting. But perhaps more from a 'this is what the confused masses of amateur PL implementors are currently thinking' perspective!
We are all frauds hooray :)
1


