Skip to content

Document framework naming - #855

Merged
madsmtm merged 1 commit into
madsmtm:mainfrom
joshka:joshka/document-framework-naming
Aug 6, 2026
Merged

Document framework naming#855
madsmtm merged 1 commit into
madsmtm:mainfrom
joshka:joshka/document-framework-naming

Conversation

@joshka

@joshka joshka commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I got briefly confused by Apple’s default Swift documentation showing NSApplication.shared, while objc2 exposes NSApplication::sharedApplication.

I’m new both to objc2 and to macOS app development, so I didn’t have the context to make that connection. The existing naming-policy discussion explains why, but I only found it after asking an LLM to help me understand this. This adds a short note to the generated-framework overview explaining the Objective-C/Swift naming difference and linking to both the Objective-C Apple docs and the policy discussion.

@joshka
joshka marked this pull request as ready for review August 5, 2026 03:10

@madsmtm madsmtm left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I agree that this makes sense to have!


## Naming

The framework crates generally retain Objective-C selector names, rather than

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: retain is a bit overloaded in Objective-C context.

Suggested change
The framework crates generally retain Objective-C selector names, rather than
The framework crates generally use Objective-C selector names, rather than

Comment on lines +25 to +26
When comparing an API with Apple documentation, select the Objective-C
language view, for example [NSApplication.sharedApplication][nsapplication-shared-application].

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer something like this? Reads a bit clearer to me, and also provides guidance on where the place to change the language is (I think you have to click the button, Apple's docs sometimes cache the chosen language and redirects IIUC).

Suggested change
When comparing an API with Apple documentation, select the Objective-C
language view, for example [NSApplication.sharedApplication][nsapplication-shared-application].
When comparing APIs with Apple's documentation, select the Objective-C
language view in the top right, for example [NSApplication.sharedApplication][nsapplication-shared-application].

@madsmtm madsmtm added the documentation Improvements or additions to documentation label Aug 5, 2026
@madsmtm madsmtm modified the milestones: block2 v0.7.0, objc2 v0.7.0 Aug 5, 2026
@joshka
joshka force-pushed the joshka/document-framework-naming branch from 9697af9 to f6c8cc7 Compare August 6, 2026 00:56
@joshka

joshka commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

I addressed both comments in f6c8cc7

@madsmtm
madsmtm merged commit ff73064 into madsmtm:main Aug 6, 2026
16 of 18 checks passed
@joshka
joshka deleted the joshka/document-framework-naming branch August 6, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants