14 posts tagged ‘Language Design’
Swift Prospective Vision: Accessors
John McCall (forum): However, this approach has significant problems. The biggest is that the get accessor has to return an independent value. If the accessor is just returning a value stored in memory, which is very common for data structures, this means the value has to be copied.[…]This vision document lays out the design space […]
Swift Proposal: Precise Control Flags Over Compiler Warnings
SE-0443: This proposal suggests adding new options that will allow the behavior of warnings to be controlled based on their diagnostic group.-Werror <group> - upgrades warnings in the specified group to errors-Wwarning <group> - indicates that warnings in the specified group should remain warnings, even if they were previously suppressed or upgraded to errors[…]Thus, for […]
Swift Vision: Improving the Approachability of Data-Race Safety
Holly Borla (via Mastodon, forum): This document lays out several potential paths for improving the usability of Swift 6, especially in simple situations where users aren’t intending to use concurrency at all. […] A key tenet of our thinking in this vision is that we want to drastically reduce the number of explicit concurrency annotations […]
Swift Concurrency Proposal Index
Quinn (via Fatbobman): This post summarises the Swift Evolution proposals that went into the Swift concurrency design. It covers the proposal that are implemented in Swift 6.0, plus a few additional ones that aren’t currently available.The focus is here is the Swift Evolution proposals. For general information about Swift concurrency, see the documentation referenced by […]
Thomas Kurtz, RIP
Valley News (Hacker News): Tom is well known as the co-inventor, with John Kemeny, of the BASIC programming language in 1964. A version of BASIC still exists today. John Kemeny and Tom had already developed a version of the Dartmouth Timesharing System, a method of sharing computer access allowing multiple students access to the computer […]
Swift Proposal: Integer Generic Parameters
SE-0452 (via Steve Canon): Swift does not currently support fixed-size or fixed-capacity collections with inline storage. (Or at least, it doesn’t do so well, not without forming a struct with some specific number of elements and doing horrible things with withUnsafePointer to handle indexing.) Most of the implementation of something like a fixed-size array, or […]
Swift Protocol Requirement Quirks
Jesse Squires: A handful of protocol witness mismatches are currently allowed:Non-failable initializers can satisfy failable initializer protocol requirements (as I encountered above)Non-throwing functions can satisfy throwing function protocol requirementsNon-escaping closure parameters can satisfy @escaping protocol requirementsGeneric functions can satisfy non-generic protocol requirementsNon-mutating functions can satisfy mutating protocol requirementsEnum cases can satisfy static function protocol requirementsSynchronous […]
Is Objective-C BOOL a Boolean Type?
Juan Cruz Viotti: While BOOL might look trivial, its definition is rather complex. It depends on which Apple platform and architecture you are targeting, which can result in unexpected behavior. […] Recently, I stumbled into a case where for the same code, macOS Intel and macOS Apple Silicon invoked different overloads. […] As we can […]