website icon indicating copy to clipboard operation
website copied to clipboard

Update constants section to talk about inlining

Open aslilac opened this issue 3 years ago • 1 comments

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.

aslilac avatar Dec 01 '22 01:12 aslilac

Yup yup, this is outdated documentation. Thank you!

lpil avatar Dec 01 '22 09:12 lpil