How might linear types work in swift?
Swift Forums
How might linear types work in swift?
Thought I'd break this off from [Pitch] Introduce a way to annotate functions that are called at most once since I think it is interesting to consider and wanted to respond to @jrose but it's not super pertinent to that pitch. I'd argue that Deinit types should not be able to store ~Deinit types (so it isn't too easy to avoid consuming them), so this example would need some internally unsafe, stdlib type like DeinitConsume<T: ~Deinit & ~Copyable> that calls a consuming method in it's deinit, a...
0 comments
No comments yet.