-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime Dependency Annotations for Non-escapable Types #2305
Open
tbkka
wants to merge
62
commits into
swiftlang:main
Choose a base branch
from
tbkka:tbkka-lifetime-dependency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,317
−0
Open
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
7e767dc
First full draft.
tbkka 243e33b
Whitespace cleanup
tbkka b30308d
Fix formatting
tbkka ccc54d9
Future direction: Lifetime dependencies between arguments
tbkka 2992389
Link to pitch thread
tbkka ba3946c
New examples for Future Directions
tbkka 0aab19d
Match the implementation: Use local parameter names for argument ref…
tbkka f9b06b7
Clarify some Alternatives and Future Directions
tbkka 84521ca
methods are `mutating`, not `inout`
tbkka 3055bec
Expand alternative syntaxes
tbkka 78d07f2
Overhaul to adopt the new `@dependsOn()` syntax
tbkka 6ebcdb4
Corrections from meg-gupta
tbkka eed1b05
Overhaul semantics discussion
tbkka 2e82c6b
Use "nonescapable" for the concept, rather than `~Escapable`
tbkka f648b02
Use "copied lifetime dependency" more consistently
tbkka a502076
s/@dependsOn/dependsOn/ to match implementation
tbkka 40a78d9
Changed `StorageView` and `BufferReference` to `Span` to match the si…
atrick bf846dd
Merge pull request #1 from atrick/rename-span
tbkka 25e4355
Add a link to the forum discussion.
atrick af162ef
Additions to Proposed solutions
atrick adfe8a0
Dependency semantics by example
atrick 3b6f859
Cleanup Future directions
atrick 2fd52e1
Additions to Future directions
atrick 1c5a02e
Grammar updates
atrick c6ede5d
Merge pull request #2 from atrick/update
tbkka def2c82
Update and cleanup the grammar.
atrick d9aa90b
Merge pull request #3 from atrick/lifetime-dependency
tbkka 992b2fe
Add a change log entry.
atrick aed8750
Syntax update: dependsOn(self).
atrick 1859b98
Remove Future Direction: only limited to results
atrick 6c80aca
Fix OwnedSpan ~Escapable typo.
atrick 43dbc15
Tweak wording in the `ref1.drop` example.
atrick d8f4cb3
New section: Immortal requirements.
atrick 5555ee6
New alternatives considered: Initializer syntax.
atrick eb1d88e
Update Future component syntax.
atrick a9ca58d
New alternative considered: dependsOn(unchecked)
atrick 181050a
Remove redundant future direction: containers and their elements
atrick d7c1ac7
Move "Parameter index" section to Alternatives considered.
atrick b01cd1e
Typo in example from "Depending on an escapable"
atrick 02fc95a
Rename Array to ContiguousArray.
atrick de45422
New example: Escapable properties in a nonescapable type
atrick 5b0fd84
Changelog entries
atrick 226d635
Merge pull request #4 from atrick/lifetime-dependency
tbkka 9acaba8
Fix a grammar typo.
atrick 51832e8
Fix a typo in the dependent parameters example.
atrick 0ed7906
Typo: fix two more cases of Array -> ContiguousArray renaming.
atrick b6c51d8
Merge pull request #5 from atrick/lifetime-dependency
tbkka a969447
Update the free-standing function inference rules.
atrick 25f30b3
Merge pull request #6 from atrick/lifetime-dependency
tbkka e1d364e
Added future directions: Function type syntax and closures
atrick e814e62
Merge pull request #7 from atrick/lifetime-dependency
tbkka 9583bd7
Add an alternative spelling: `lifetime` vs. `dependsOn`.
atrick 699d547
Merge pull request #8 from atrick/lifetime-dependency
tbkka f337c2f
Remove the Alternative: Initializer syntax: result vs. inout syntax
atrick 3b6439c
Add Alternative: @lifetime annotation and where clause.
atrick ac43daa
Simplified implicit lifetime dependencies
atrick 4152b2e
Merge pull request #9 from atrick/lifetime-dependency
tbkka 5cd2fd3
Fix inference rules to be sequenced.
atrick 0a4392f
In the lifetime annotation example, add an argument label.
atrick f16293c
Merge pull request #10 from atrick/lifetime-dependency
tbkka b841b47
Update Future Direction: Lifetime dependence for closures
atrick 9ba7a57
Merge pull request #11 from atrick/lifetime-dependency
tbkka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Typo: fix two more cases of Array -> ContiguousArray renaming.
- Loading branch information
commit 0ed7906a7a81c5002048c5cc27f3217e0e4c6a73
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.