bernds74
Joined 6 years ago
Joined 6 years ago
Case in point: list::sort. You don't want to try running quicksort on a linked list. Or remove_if: great we've abstracted the difficult task of removing things without erasing them, except we can't do it on maps. (C++20 seems to add an erase_if, apparently admitting that the two-step remove/erase is silly).
Then there's the fact that C++ iterators are basically pointers into the data structure, where for vectors (your common case) you'd do much better with index/container pairs, both for stability and bounds checking.
Although I haven't played with it and can't tell you whether it can compile the open source Zork.
Like those birds that will always mirror your movement to stay just out of reach, move erratically otherwise so you're guaranteed not to get a hit in (forget about hitting them with your spear when they're in the air), and just when you managed to get under them where you might be able to land a hit they'll drop down on you to deal contact damage and flutter away again.
10 hours in, and I've not even started the game since Saturday afternoon, when I was expecting not to be able to drag myself away from it (being a huge fan of the first Hollow Knight).