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

Change the extension syntax #74

Merged
merged 1 commit into from
Oct 5, 2024
Merged

Conversation

joajfreitas
Copy link
Owner

We will now use:

impl protocol for Struct {
    ...
}

Before the extension block started with an identifier, basically any word would fit. This meant that typos on high level blocks issued a very confusing error messaged about how the syntax for an extend block was wrong, even when the typo was on a struct or enum.

Another possible advantage is that now there's no different names for the extension and its type. They will always be the same, hopefully this will mean less confusion when debugging message definitions.

resolves #65

We will now use:

```
impl protocol for Struct {
    ...
}
```

Before the extension block started with an identifier, basically any
word would fit. This meant that typos on high level blocks issued a very
confusing error messaged about how the syntax for an extend block was
wrong, even when the typo was on a struct or enum.

Another possible advantage is that now there's no different names for
the extension and its type. They will always be the same, hopefully this
will mean less confusion when debugging message definitions.
@joajfreitas joajfreitas merged commit 6637954 into master Oct 5, 2024
7 checks passed
@joajfreitas joajfreitas deleted the adapt_extension_syntax branch October 5, 2024 14:07
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.

Rethink extends syntax
1 participant