Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Meta-Issue: Documentation Burn-down list (DRAFT) #2079

Open
10 of 12 tasks
Tracked by #3921
crusso opened this issue Oct 27, 2020 · 3 comments
Open
10 of 12 tasks
Tracked by #3921

Meta-Issue: Documentation Burn-down list (DRAFT) #2079

crusso opened this issue Oct 27, 2020 · 3 comments
Labels
documentation Motoko-related documentation meta Meta issue

Comments

@crusso
Copy link
Contributor

crusso commented Oct 27, 2020

Our documentation is lacking examples for the following features already documented in the language-manual.adoc.
This is a check-list to keep track of what's missing.

  • checking of all examples (in progress)
  • consistent formatting of all examples using fences of the form
    [source, motoko]
    ----
    
    or
    ....
    ....
    
  • option/result/try-catch error handling (Christoph working on it)
  • separate section on upgrades, stable variables and system methods (pre/postuprade).
    simple example requiring just stable variables: StableCounter.mo
    advanced example (requiring system methods): StableRegistry.mo
  • caller id:
    • on shared functions
    • on actor classes
    • e.g. illustrating both
        shared(msg) Counter {
              pulbic shared(msg1) inc () {
                assert (msg1.caller == msg.caller);
                count := 1;
         }
      
  • oneway shared functions (unless we disable those) (e.g. Counter.reset : () -> ())
  • scoped awaits (if we want to explain that at all)
  • mini ToC for language-manual.adoc
  • cross-referencing sections where appropriate (e.g. linking to section on shared when mentioning shared)
  • move language-manual up one level (perhaps just using adoc feature to do this?)
  • intro to base library
  • working with funds/cycles (see doc/attic/funds.adoc for previous version)
@crusso crusso added doc-review-request Documentation-related PRs that an author (writer or developer) wants reviewed documentation Motoko-related documentation and removed doc-review-request Documentation-related PRs that an author (writer or developer) wants reviewed labels Oct 27, 2020
@rossberg
Copy link
Contributor

I have a request: can the documentation avoid the overuse of pattern matching and use the form shared(msg) for binding message contexts? I believe that is clearer and avoids the confusion around the use of braces for this, which many seem to conclude are part of the shared syntax, not a pattern.

@crusso
Copy link
Contributor Author

crusso commented Oct 28, 2020

I have a request: can the documentation avoid the overuse of pattern matching and use the form shared(msg) for binding message contexts? I believe that is clearer and avoids the confusion around the use of braces for this, which many seem to conclude are part of the shared syntax, not a pattern.

why the parens though? And msg or ctxt?

@rossberg
Copy link
Contributor

To be consistent with the (mainstream) style of writing parameters elsewhere.

I'd probably use msg, because msg.caller seems intuitive and matches how it is named in other systems.

@rossberg rossberg added the meta Meta issue label Feb 2, 2021
@crusso crusso mentioned this issue Apr 4, 2023
79 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation Motoko-related documentation meta Meta issue
Projects
None yet
Development

No branches or pull requests

2 participants