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 constants section to talk about inlining #203

Open
aslilac opened this issue Dec 1, 2022 · 1 comment
Open

Update constants section to talk about inlining #203

aslilac opened this issue Dec 1, 2022 · 1 comment
Assignees

Comments

@aslilac
Copy link
Contributor

aslilac commented Dec 1, 2022

https://gleam.run/book/tour/constants.html

When a constant is referenced the value is inlined by the compiler

This is true for Erlang, but not for JavaScript, and it would probably make more sense to update this documentation than the change the JavaScript generation, because there are actually a lot of reasons why JavaScript constant inlining would be bad.

@lpil
Copy link
Member

lpil commented Dec 1, 2022

Yup yup, this is outdated documentation. Thank you!

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

No branches or pull requests

3 participants