gleam
gleam copied to clipboard
Add info about named accessors having priority over module function calls
see: https://gleam.run/book/tour/modules.html vs https://gleam.run/book/tour/custom-types.html?highlight=named%20access#named-accessors
request.put_header("content-type", "application/json")
versus
request.some_member
Sorry @inoas , what do you mean?
Based on recent experience, in the following situation:
- A module and variable share the same name, and
- That variable references a non-opaque record with a field that shares a name with a function in the record's module
The variable.field
accessor shadows the module.function
call.