Writing correct code makes this discussion useless. ![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
No - that's what I wanted to express with my "by the way". The bug was just the trigger that made me
notice the copy semantics. I didn't know about them before. And I didn't start a discussion about this topic because I was so scared of my bug happening again.
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)
As it happened at me and I am aware of the semantics now, it probably won't happen too often in future. But I thought there might be other users with a similar concern.
However, I inteded to question the copy ctor and assignment operator of resources in a general way.
IMHO it's only "abused" when the developer doesn't know what he's doing. I think SFML shouldn't provide mechanisms to help developers making less errors -- this is the task of each developer.
The point was to discuss if the semantics are really needed by SFML users. In my opinion, features that carry a risk are worth discussing, especially if the advantage of an existing feature is doubted (as it was at least by me). But I am repeating myself...
And yes, SFML
should at least try to minimize error sources which result of wrong library design. I don't say the status quo is wrong, it's meant as general statement. Minimizing error sources: This may one of the reasons why SFML is written in modern, abstracted C++ and makes use of a lot of efficient, typesafe and few low-level programming techniques.
It's not really the question of if it's needed or not, but IF it's needed, you can do it.
For the most part, you are right. But this argument could be applied to most features. A sf::Sound member function to rewind? It's not really needed, but IF, you can do it.
I understand that there are some real cases for copies. Unfortunately, I am trying to explain my motives again and again. Apart of some exceptions, they seem to be either ignored or misunderstood. I hope some people can at least reconstruct them - even if they aren't sharing my opinion.
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
To clarify it, I
do understand what was the idea behind copyable resources. It would just have been nice if there were a little bit more descriptive examples.
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)