Closed fassko closed 4 years ago
Finally: https://twitter.com/jckarter/status/1217861938136276993 πππ
Pitch: Enum cases as protocol witnesses
Introduction Allow enum cases to satisfy static protocol requirements.
Swift-evolution thread: Enum cases as protocol witnesses
Motivation Currently, Swift has a very restricive protocol witness matching model where protocol witnesses have to match exactly with a requirement, with some exceptions (see protocol witness matching manifesto).
One of the restrictions is that a witness cannot be thought of as a "sugar" for a requirement. The most obvious example of this is an enum - currently, enum cases cannot satisfy protocol requirements.
It is not unreasonable to think of an enum case (without payload) as a static, get-only property that returns Self or an enum case (with payload) as a static function (with arguments) that returns Self.
https://forums.swift.org/t/pitch-enum-cases-as-protocol-witnesses/32753
Swift for Android: Call for the Community
For a little over a year, I have been collaborating with the open source community in bringing Swift support for Android up to the level that other platforms enjoy (namely Darwin and Linux), mainly thanks to the incredible job others did before me. Sadly, I will not be able to continue dedicating a lot of time to those efforts, and with this post I want to inform the community of people interested in Swift for Android.
https://forums.swift.org/t/swift-for-android-call-for-the-community/32766
Another funny https://twitter.com/gregheo/status/1218951592164151296
I think the results of the survey are also relevant for this issue: https://twitter.com/simjp/status/1218613429881040897
Status of SE-0266
SE-0266 (synthesized Comparable conformances) was accepted back in october, and has had an implementation ready to merge since then, but so far, there has been no action on it. to date, iβve had to update the implementation branch five times to fix merge conflicts. each time, it has been passing all tests and the source compatibility suite. when can we expect this feature to finally get merged?
SE-0270 has been revised and placed back into a third review. Please see the new review thread for an explanation.
https://forums.swift.org/t/revised-se-0270-add-collection-operations-on-noncontiguous-elements/32840
SE-0270 (Review #3): Add Collection Operations on Noncontiguous Elements
The third review of SE-0270: Add Collection Operations on Noncontiguous Elements begins now and runs through January 28th, 2020. The first review was here, and the second is here.
Allow chained member references in implicit member expressions
Introduction Following up on the discussion thread from the other day, I propose that we extend implicit member syntax (a.k.a. "leading dot syntax") to allow for chained member references rather than just a single level.
Motivation When the type of an expression is implied by the context, Swift allows developers to use what is formally referred to as an "implicit member expression," sometimes referred to as "leading dot syntax"
https://forums.swift.org/t/allow-chained-member-references-in-implicit-member-expressions/32829
Set-only subscripts
Currently, subscripts can be read-only or they can be read-write, but there is no way to declare a subscript as write-only. Write-only subscripts have a number of important uses, and this proposal aims to bring them into the language.
On the road to Swift 6
The Swift project has achieved a critical milestone of maturity of the core fundamentals, providing stability for users to invest in using Swift in earnest. On Apple's platforms such as macOS and iOS, the arrival of ABI and module stability has enabled the creation of stable binary frameworks. Further, the Swift Package Manager, which has integrated support both in Xcode and other IDEs, provides a cross-platform solution for building and distributing Swift libraries. Put together, these form the critical ingredients to foster the development of a blossoming Swift software ecosystem.
With those fundamentals in place, as a community, we are well-poised to pursue new frontiers for the Swift project. Iβd like to highlight a few areas that the Core Team believes provide really exciting opportunities for the community to drive Swift forward.
https://forums.swift.org/t/on-the-road-to-swift-6/32862
https://twitter.com/clattner_llvm/status/1220188802745913344
Swift-driver and βhelp
One of the goals of swift-driver is to adopt a library-based architecture for better integration with build tooling. To that end, I've recently been doing some refactoring so that even simple invocations like swift --version
are modeled as driver jobs. This means library clients no longer need to worry about the driver spawning processes they cannot control. Instead, a library client which doesn't want to use the built-in job execution functionality can just obtain a list of jobs and run them on its own if it wants to, for example, do something unusual with stdout.
Continuous delivery with server-side Swift on AWS
This post explains how to use Amazon Web Services (AWS) to create a continuous delivery pipeline for server-side Swift code. We will be creating a pipeline using managed AWS services, such as AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy. This pipeline will compile, build, test, and deploy a simple Swift web service onto two compute platforms: directly on EC2 virtual machines running Ubuntu, and on AWS Fargate, a managed container platform.
https://aws.amazon.com/blogs/opensource/continuous-delivery-server-side-swift-aws/
Swift on the Server Workgroup meeting January 9th, 2020 notes
More push towards distribution and promotion of the Server Side Swift Framework
Lots of efforts are being made for creation of new frameworks and creating new libraries since last few years for making Swift on Server Side a real success, which is commendable. Let's also accept the fact that server side swift is also something which requires cooperation and support of wider developer community outside Apple ecosystem too, especially on Linux side and, so cooperation with external developers is also a requirement. A time has come for putting efforts also towards promotion and distribution of Server Side Swift too.
https://twitter.com/dgregor79/status/1220581447087443968
Finally merged a large refactor I've been doing on-and-off for a while. By itself it has no user-visible effect, but it's the building block to make #SwiftLang function builders more powerful and expressive. https://github.com/apple/swift/pull/29331
For example, it makes supporting multiple conditions for "if" statements within function builder closures a straightforward generalization of the refactored code. This would have required some gross hackery with the old implementation of function builders. https://github.com/apple/swift/pull/29409
... and now support for "if #available" within function builders: https://github.com/apple/swift/pull/29419
This is really part of a much larger effort to improve #SwiftLang function builders, parts of which have been landing over the last ~6 months. So, I wrote up a summary of what we've been up to in this area: https://forums.swift.org/t/function-builders-implementation-progress/32981 https://twitter.com/dgregor79/status/1220581447087443968
Package Manager Localized Resources
I've written a proposal that builds on the previous Package Manager Resources proposal that was recently accepted to support localized resources. I'm planning to work on an implementation in parallel so people can play with it.
https://forums.swift.org/t/package-manager-localized-resources/32963
http://Swift.org nightly development snapshots now available in Docker images at https://hub.docker.com/r/swiftlang/swift/tags!π
https://forums.swift.org/t/nightly-swift-docker-images/33029
The beginnings of a deployment/production debugging guide for Swift on Server in this Swift forums post? https://forums.swift.org/t/strategies-for-debugging-server-side-swift-in-production/33031
The SSWG's focus areas also feature this for 2020: https://swift.org/blog/sswg-update/#deployment-guides
https://twitter.com/johannesweiss/status/1221196239640973313
Add Float16
The last decade has seen a dramatic increase in the use of floating-point types smaller than (32-bit) Float . The most widely implemented is Float16 , which is used extensively on mobile GPUs for computation, as a pixel format for HDR images, and as a compressed format for weights in ML applications.
SwiftPM support for Swift scripts
Swift is a general-purpose language that aims expand it's availability and impact on various domains and platforms. We believe great scripting support and experience is an important part of improving the impact of Swift as a language. Swift already includes basic support for scripting via the Swift command-line tool. This is a proposal for greatly improving the script support by providing a deeper integration with the Swift Package Manager.
Swift-evolution thread: Discussion thread topic for that proposal
https://forums.swift.org/t/swiftpm-support-for-swift-scripts/33126
we can add this tweet with thread https://twitter.com/mattt/status/1221863288469782528
Three steps to Variadic Generics
Variadic generics was referred to in "On the road to Swift 6". I think it may be a good idea to break down it into the following three steps compared to tackle variadic generics directly.
- Operations for tuples
- Variadic tuples
- Variadic generics
https://forums.swift.org/t/three-steps-to-variadic-generics/33154
[Accepted] SE-0276: Multi-Pattern Catch Clauses
The review of SE-0276 "Multi-Pattern Catch Clauses" ran from January 15 through January 22, 2020. Feedback was almost universally positive, and the proposal has been accepted! Thank you to everyone who participated in the review process.
https://forums.swift.org/t/accepted-se-0276-multi-pattern-catch-clauses/33220
[Rejected] SE-0275: Allow more characters (like whitespaces and punctuations) for escaped identifiers
The Core Team has decided to reject proposal SE-0275: Allow more characters (like whitespaces and punctuations) for escaped identifiers.
To contribute to this issue, simply leave a comment here. Please also review our contributing guidelines.
The current draft for this issue in
_drafts/
. If you want to contribute directly, feel free to open a pull request.