-
Notifications
You must be signed in to change notification settings - Fork 137
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
Improve documentation #959
Comments
It may be worth explicitly noting that return values are copied. I have an example for that here: |
And here's an example for the pub const gotcha: https://play.onflow.org/3ca9083a-4662-48ec-8211-c636ac25e88d?type=account&id=0 |
On the access control page, add "Remember that if you can access a let dictionary or array you can mutate its contents, this includes when they are pub or access(all) member variables of a contract, resource or struct." |
@rheaplex It's documented that it's pass-by-value, but we should make that more prominent / add it as an example / detail, agreed 👍 |
@rheaplex also, @bluesign had the great idea to report a warning, I've opened onflow/cadence-tools#429 for that |
I've been going through the Cadence reference documentation and started collating information about all the symbols and operators. While it doesn't completely satisfy the need for a comprehensive glossary mentioned in onflow#959, it can perhaps be a step in that direction and help developers who are learning Cadence to quickly look up the various symbols (something that is hard to do in the documentation Algolia search bar. For example `as?` does not return any useful result).
Various topics should be added or improved:
Tasks:
Todos:
getAccount
andgetAuthAccount
math/rand
nil
is a NO-OP. An optional is a single-element container, and if it has no value, there is nothing to do. Just like destroying another container, like an empty array or empty dictionaryload
ing just to destroy the value, useAnyResource
/AnyStruct
instead of a specific type, as it may be incorrect, in which caseload
will returnnil
Array.contains
log
The text was updated successfully, but these errors were encountered: