Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove main.swift and mark CreateAPI as @main type directly#49

Merged
liamnichols merged 1 commit intomainCreateAPI/CreateAPI:mainfrom
ln/use-at-mainCreateAPI/CreateAPI:ln/use-at-mainCopy head branch name to clipboard
Jul 8, 2022
Merged

Remove main.swift and mark CreateAPI as @main type directly#49
liamnichols merged 1 commit intomainCreateAPI/CreateAPI:mainfrom
ln/use-at-mainCreateAPI/CreateAPI:ln/use-at-mainCopy head branch name to clipboard

Conversation

@liamnichols
Copy link
Member

SE-0281 introduced a new @main attribute to allow us to declare where the entry point for a program is. This allows us to control exactly which part of our code should start running, which is particularly useful for command-line programs.

https://www.hackingwithswift.com/swift/5.3/atmain

It's only a small improvement, but since CreateAPI supports Swift 5.5 and above, we might as well take advantage of it

@liamnichols liamnichols self-assigned this Jun 29, 2022
@liamnichols liamnichols merged commit 341548c into main Jul 8, 2022
@liamnichols liamnichols deleted the ln/use-at-main branch July 8, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.