3 ms·
But note that the full ownership model is not exposed in Swift. It is only present in the Swift Intermediate Language (1) - an intermediate language used by the
by jchb 8y ago
But note that the full ownership model is not exposed in Swift. It is only present in the Swift Intermediate Language (1) - an intermediate language used by the Swift compiler to perform diagnostics and Swift-semantic aware optimisations before emitting LLVM IR bit code.
It is likely that more ownership features will be added to the Swift language, but it is out of scope for the next major version as you can see on this dashboard: https://swift.org/abi-stability/ https://swift.org/abi-stability/
(1) https://github.com/apple/swift/blob/master/docs/SIL.rst https://github.com/apple/swift/blob/master/docs/SIL.rst
- oscargrouch 8y agoMy guess is that they will make this explicit in SIL first, to be able to add that into the language syntax later. For instance, as far as i know, the auto ref-counting model is on SIL, who injects lower level refcounting ops into the intermediate code, before going through the LLVM pipeline. This was a good thing to do, now that they are willing to open the ownership model to other kinds of ownership. Which will probably be controlled by the dev in the end. At least, that's what i understood from what i read. Its SIL only for now, but it means what is it implying it means. A opt-in manually controlled ownership model when ref-counting is not the best approach.