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

Add a chapter for shorthand label syntax #135

Merged

Conversation

JosephTLyons
Copy link
Contributor

@JosephTLyons JosephTLyons commented Dec 7, 2024

When I discovered I could do this, I ran to the Discord and mentioned it, and it seems like others were unaware of it as well, so it seems like a good feature to call out.

Side note: using local variables called multiply and add is a bit wonky, not the greatest of names for local vars, but I can't think of a nicer way to update calculate's internal and public labels to make the example better, so this is probably fine?

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Oh yes, thank you! Rather than try and teach both syntaxes in one lesson let's make this a new lesson that comes after

@JosephTLyons JosephTLyons force-pushed the mention-shorthand-syntax-for-labels branch from 9abcac9 to 331564a Compare December 10, 2024 05:08
@JosephTLyons
Copy link
Contributor Author

Ok, I inserted a new chapter.

@JosephTLyons JosephTLyons force-pushed the mention-shorthand-syntax-for-labels branch from 331564a to bcbe3fa Compare December 10, 2024 05:11
@JosephTLyons JosephTLyons changed the title Mention shorthand syntax for labels Add a chapter for shorthand label syntax Dec 10, 2024
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Thank you

@lpil lpil merged commit 2b7dd35 into gleam-lang:main Dec 22, 2024
1 check passed
@JosephTLyons JosephTLyons deleted the mention-shorthand-syntax-for-labels branch December 22, 2024 10:22
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