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

misc documentation (not docgen) #101

Open
1 task
timotheecour opened this issue Apr 14, 2020 · 11 comments
Open
1 task

misc documentation (not docgen) #101

timotheecour opened this issue Apr 14, 2020 · 11 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Apr 14, 2020

  • mention in docs that mixin is also a 2nd class annotation, see D20200419T032540
@timotheecour
Copy link
Owner Author

timotheecour commented Apr 19, 2020

  • document that one difference bw inc and += is that:
    var a: uint8
    var b = 1
    inc(a, b) # wokrs
    a+=b # CT error

@timotheecour timotheecour changed the title misc doc misc documentation (not docgen) Apr 21, 2020
@timotheecour
Copy link
Owner Author

document this: https://github.com/nim-lang/Nim/pull/13451/files#r385118474
when to use assert/doAssert vs throwing catchables for API's

@timotheecour
Copy link
Owner Author

how to introduce breaking changes: see nim-lang#14048 (comment)

@timotheecour
Copy link
Owner Author

this seems wrong at least for arc, and for future language spec

For let symbols a copy is not always necessary:

let s = varA    # may only copy a pointer if it safe to do so

@timotheecour
Copy link
Owner Author

manual should specify that =destroy (+ a few others to specify) is special and doesn't need to be public (cf: type bound operators)

@timotheecour
Copy link
Owner Author

add doc comment in io.open to recommend using the overload of open that raises, refs https://github.com/nim-lang/Nim/pull/16320/files#r542009301

@timotheecour
Copy link
Owner Author

extend documentation for importcpp, eg how to wrap const char*

refs: nim-lang#3720 (comment)

@timotheecour
Copy link
Owner Author

  • removePrefix + friends don't document behavior when prefix isn't found in string

@timotheecour
Copy link
Owner Author

  • {.explain.} seems useful but not documented in manual; see usage exmple here:
    $nim_prs_D/tests/concepts/texplain.nim

@timotheecour
Copy link
Owner Author

  • document this importcpp pattern:

nim-lang#4441 (comment)

You can also import constants as nullary functions instead:

proc foo(): cint {.importcpp: "FOO@".}

I'm not sure it really needs documentation. It's a clever use of the
importcpp pattern language that (I confess) I handn't thought of.
{.importcpp: "...".} can be used with the C backend. Perhaps that should
be documented. Using it this way does worry me a bit, though.

@timotheecour
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant