Skip to content
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

update: add limitations for open expect classes (KT-22841) #4176

Closed
wants to merge 3 commits into from

Conversation

zamulla
Copy link
Contributor

@zamulla zamulla commented May 7, 2024

Clarifying the limitations of actualizing an open expect class.

@zamulla zamulla requested a review from a team as a code owner May 7, 2024 13:23
@zamulla zamulla requested a review from zarechenskiy May 7, 2024 13:24
@@ -399,6 +399,24 @@ typically provides an expected `CommonViewModel` class whose actual Android coun
from the Android framework. See [Use platform-specific APIs](multiplatform-connect-to-apis.md#adapting-to-an-existing-hierarchy-using-expected-actual-classes)
for a detailed description of this example. -->

#### Limitations of open expected classes
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if it's common in our documentation, but "expected" feels wrong to me.

expect is a keyword and converting it to the adjective sounds incorrect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't disagree, and I avoided using the adjective in the text. But writing "expect classes" in the title, when we cannot highlight the keyword, reads like a grammar mistake. All the rest of the modifiers I can remember are adjectives to begin with (internal, abstract, actual...), so they don't have this problem. Here, we need a compromise.

Right now the concept we introduce on the page is "expected declarations," and that's the convention. I think it's possible to have clearer terminology here. We'll keep thinking about this.

docs/topics/multiplatform/multiplatform-expect-actual.md Outdated Show resolved Hide resolved
docs/topics/multiplatform/multiplatform-expect-actual.md Outdated Show resolved Hide resolved
@zamulla zamulla requested a review from nikitabobko May 16, 2024 07:36
@zamulla
Copy link
Contributor Author

zamulla commented May 16, 2024

In the end we decided not to highlight these limitations in docs: they are easily dealt with with compiler's help, and shouldn't affect too many people. https://youtrack.jetbrains.com/issue/KT-22841 has the history of the problem and decision-making.

@zamulla zamulla closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants