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

[superseded] {.ignoreNotNil.}: escape hatch for not nil #319

Closed
timotheecour opened this issue Jun 19, 2020 · 1 comment
Closed

[superseded] {.ignoreNotNil.}: escape hatch for not nil #319

timotheecour opened this issue Jun 19, 2020 · 1 comment

Comments

@timotheecour
Copy link
Owner

timotheecour commented Jun 19, 2020

goal

escape hatch for not nil annotations, to avoid create worse problems such as contorted code or code with bad performance

example

{.push ignoreNotNil.}
... # assume the programmer knows what he's doing
{.pop.}

concrete example

see https://github.com/nim-lang/Nim/pull/13808/files/4f6cdd797cc0db0410644e7f1216e5264968deeb#diff-f48932f809aa3e1ed2576a4fdd754e26
where {.ignoreNotNil.} would avoid not nil causing a performance regression such as nim-lang#13448

@timotheecour timotheecour changed the title {.ignoreNotNil.}: escape hatch for not nil [superseded] {.ignoreNotNil.}: escape hatch for not nil Jan 16, 2021
@timotheecour
Copy link
Owner Author

superseded by nim-lang/RFCs#317

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

No branches or pull requests

1 participant