Repository navigation
Conversation
ktoso
requested review from
hamishknight,
hborla,
nkcsgexi and
rintaro
as code owners
October 29, 2026 04:40
Contributor
Author
|
@swift-ci please test |
rintaro
reviewed
Oct 29, 2026
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
Cross-repo with swiftlang/swift#93760 @swift-ci please test |
Contributor
Author
|
Going to wait with this some more, we may decide a different name so maybe I can avoid some churn |
ktoso
force-pushed
the
wip-send-expr-on-main
branch
2 times, most recently
from
November 5, 2026 07:36
c329d4b to
1d2b39a
Compare
Add `SendExprSyntax` for `send <call>`, a fire-and-forget alternative to
`await` for calls to actor isolated functions, gated behind the `SendCalls`
experimental feature.
Like the C++ parser, `send` is only parsed as the keyword when it is
followed on the same line by an identifier, `self` or a `$` identifier,
so existing uses of `send` as an identifier (`send(x)`, `send = 1`,
`x.send`, `send { }`) keep parsing as before.
Use the shared contextual-keyword disambiguation instead of a custom peek rule, matching 'copy'/'consume'/'each'. This also makes 'send' a keyword before any expression-starting token, e.g. 'send try x.f()' now parses as a 'SendExprSyntax' of a 'TryExprSyntax' instead of a "consecutive statements" error; such code was never valid as two statements anyway.
ktoso
force-pushed
the
wip-send-expr-on-main
branch
from
November 5, 2026 07:48
1d2b39a to
0363ef4
Compare
Contributor
Author
|
@swift-ci please test |
hamishknight
reviewed
Nov 5, 2026
| case .throws: | ||
| return KeywordSpec("throws", isLexerClassified: true) | ||
| case .send: | ||
| return KeywordSpec("send") |
Contributor
There was a problem hiding this comment.
Did the experimental feature here get dropped intentionally?
Contributor
Author
There was a problem hiding this comment.
Sorry let me make this a draft for now, was building a toolchain using ci for an adopter to try out and dropped it. I'll ping when reviewable !
ktoso
marked this pull request as draft
November 5, 2026 12:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pairs with the experimental work on send (that's being pitched here https://forums.swift.org/t/pitch-2-send-and-oneway-method-calls/90305).
The related swift change is here: swiftlang/swift#93760
This introduces the
sendcall expression, gated behind theSendCallsexperimental feature, e.g.: