3 ms·
> Lily uses reference counting for memory management with garbage collection as a fallback. I'd just call this GC where it's rc + (presumably) a tracing GC. >
by staticassertion 8y ago
> Lily uses reference counting for memory management with garbage collection as a fallback.
I'd just call this GC where it's rc + (presumably) a tracing GC.
> .reject(|r| r.is_space() )
This is nice. I've always found "filter" to be a confusing name. Filter in? Filter out?
'reject' is a very clear name - if it is a space, reject it.
Code looks really reasonable.
I find `: {` to be a strange idiom. Why not one or the other? Seems to distinguish between single vs multiline? I guess that's reasonable. A bit noisy.
- panic 8y ago'reject:' is originally from Smalltalk, along with 'collect:' (map), 'select:' (complement of reject), 'detect:' (first matching element), and 'inject:into:' (foldl). I agree that these names are better -- they even rhyme so they're easier to remember!