News for hackers. Stuff that matters.
Re:The Swift Array Design (2014) by andijcr on Monday March 22, 2021 @04:32AM (#26538148)
for the first one, there is no direct equivalent, but you can directly loop over any [Derived] collection as a reference to [Base]
Re:The Swift Array Design (2014) by s3cur3 on Monday March 22, 2021 @06:46AM (#26539024)
True! It’s only an annoyance when you need to pass a std::vector<Derived> to a function that only accepts std::vector<Base>.