Skip to content

Style guide update #5037

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

Open
wants to merge 2 commits into
base: docs-restructure
Choose a base branch
from

Conversation

Demali-876
Copy link

This PR updates the style guide from PR #5031.

@Demali-876 Demali-876 requested a review from a team as a code owner April 11, 2025 17:54
Copy link
Contributor

@crusso crusso left a comment

Choose a reason for hiding this comment

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

It looks good, apart from including the grammar. Just link to it instead.

Comment on lines +262 to +263
func add(x : Nat, y : Nat) { x + y };
func mul(x : Nat, y : Nat) { x * y };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func add(x : Nat, y : Nat) { x + y };
func mul(x : Nat, y : Nat) { x * y };
func add(x : Nat, y : Nat) : Nat { x + y };
func mul(x : Nat, y : Nat) : Nat { x * y };

<!--
=== To be extended
-->
## Motoko grammar
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't include the grammar but link to it instead, since it is often updated as the language changes. It used to live in doc/md/examples/grammar.txt or similar.

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.

2 participants