mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-10 12:16:04 +00:00
638e7acc8e
Without lifetime tracking, ranges pose a number of issues with regards to memory safety - use openArray instead which is limited but safe. In its present form, ranges take a copy of whatever is passed to them which obscures the copies that they take, leading to misleading and slow code. If openArray is not applicable, simply do a seq copy - it's fine and really doesn't matter in 95% of all cases, then profile and use other techniques where needed.
9 lines
174 B
Nim
9 lines
174 B
Nim
{.deprecated: "unattractive memory unsafety - use openArray and other techniques instead".}
|
|
|
|
import
|
|
ranges/memranges,
|
|
ranges/typedranges
|
|
|
|
export
|
|
memranges, typedranges
|