Closed bung87 closed 1 year ago
not usefull here
the closure is useful / deliberate here: it provides an assert when misused / there's a bug
I see isSentinel
is used, so it may not be mis used internal, does users can access it ?
does users can access it ?
indirectly, when calling functions within the library that use it - directly, no - but that doesn't really matter - what we want to avoid is:
gcsafe
violationsdoes users can access it ?
indirectly, when calling functions within the library that use it - directly, no - but that doesn't really matter - what we want to avoid is:
- global var/let - these cause
gcsafe
violations- new instance every time: unnecessary heap allocations
I understand that, so I cant find easier way to patch this. in the end I change it to nil.
so I cant find easier way to patch this
The capability to make const proc shouldn't be removed from Nim - potentially, it could be limited so that proc's assigned to consts don't do const violations
I may make it partially support or wait for real const clsoure implementation.
wait for real const clsoure implementation.
this is the way to go - ie Nim shouldn't break existing valid use cases unless there's a strong reason to, and this doesn't strike me as one
refs: https://github.com/nim-lang/Nim/pull/20408
const closure not usefull here, so I consider can saftly remove.