4 ms·
> This is a really far-reaching change in Swift, and I’m certainly curious how it will be used. If the answer isn’t “Swift Data” I’ll be disappointed! i think
by andrekandre 3y ago
> This is a really far-reaching change in Swift, and I’m certainly curious how it will be used. If the answer isn’t “Swift Data” I’ll be disappointed!
i think swift data uses classes, so i'd guess ~Copyable isn't for that at least on the surface...?
also the ~Copyable the examples there weren't very great imo, but i think something like a file handle might have been better. for example a file.close() being consuming, making sure you don't use it again after closing it.
also, wouldn't this new feature mean it might be possible to emulate type-states in swift now?