3 ms·
> To avoid having to re-create the same key commands multiple times, and to only do so when actually needed, we’ll use a lazy property to keep track of them int
by saagarjha 8y ago
> To avoid having to re-create the same key commands multiple times, and to only do so when actually needed, we’ll use a lazy property to keep track of them internally as well
Honestly, I think this is a premature optimization. I don’t think it’s worth trying to prevent the allocation of a four element constant dictionary, especially one which requires awkward syntax (indirection through a computed value) to work because it must fulfill a protocol requirement.