With the exception of smart pointers, all of the code used in this book is modern. I have made a decision quite early on during the writing stage to stick to raw pointers for educational purposes. If you're picking this book up, it's fair to assume that you have at least a decent knowledge of C++, hence you probably have used smart pointers or at the very least have heard of them. At least to me, it seemed that learning how to properly dispose of dynamically allocated objects was more beneficial than using a feature that does it for you, especially since so many newbies have problems with memory leaks. Instead of using smart pointers and swiping the problem under a rug, I attempted to tackle it in a way that seemed the most fit. I guess we'll just have to wait and see how it works out in the long run though.
I would argue that the correct way to manage dynamically allocated memory is with RAII and smart pointers. Teaching manual memory management seems misguided to me - especially since it's incredibly hard to get right and code te ds to get pretty ugly with lots of try-catch blocks if you really want to handle all possible leaks and smart pointers solve the whole problem quite elegantly.
I'd have written that line from the book cover as auto texture = std::make_unique<sf::Texture>();
I agree, it is a more elegant solution. Not sure I'm on the same page about teaching manual memory management being misguided though. It's a useful skill to have, hence a subject worthy of being taught, as you yourself said that it's hard to get right. At the end of the day, it came down to a simple choice: Do I want a more elegant yet educationally lacking solution for non-production code, or one that is unjustly so looked down upon by many C++ modernists, but with a purpose of teaching something. I chose the latter, obviously, with relatively little negatives to show for it. Performance wasn't impacted in any way, which should always be your number one concern. Whether it was the right choice for the book remains to be seen, so I guess we'll just have to let time do its thing.
Besides, we shouldn't be judging usage of raw pointers too harshly. The source code of SFML itself has lines like this in it:
m_impl = new priv::ThreadImpl(this);
...
delete m_impl;
m_impl = NULL;
On a side note, it wouldn't really be a huge task for the reader to utilize smart pointers while reading this book, should they choose to do so. The rest of the code is fairly modern and uses C++11 standards. With that said, I think we should wrap up this discussion, since it's really just a matter of opinion at this point.