I'm writing code that manipulates portions of `seq``s, and I keep creating proc 
parameter lists that include ``input: openarray[byte]; inRange: var 
Slice[int]`, and then inside the proc I keep writing stuff like 
`input[inRange.a + i]` 😝

I have a large C++ codebase that uses a custom `slice` type that simply 
contains a pointer and a length, and I've found it extremely useful over the 
years; it really cleans up code that deals with byte ranges. (C++17's 
`string_view` is pretty much the same thing.) Of course it's very unsafe, but 
I'm used to that in C++. I'd like a safer version of it (more like Go's) in 
Nim. So I'm implementing one now; your toy sequence class from your ARC/ORC 
talk is proving very useful!

Reply via email to