This is my first question and I hope it's appropriate.
Often in the process of teaching a subject I start with examples of a phenomenon, exhibiting similar properties between the examples and building an abstract concept of something. Turns out that the concept underlying the technical definition is much more powerful than the definition itself and becomes a hindrance when the theory is not strong enough to support the idea in its full generality. Students come up with examples compatible with the idea but not the technical definition.
For instance, when teaching functions I discuss that for each street in a city there is a name to it (here in Brazil our streets are rarely numbered but have the name/date of important events or people). For each name we can compute the length of the word and therefore we can associate with each street the length of its name. This illustrates what I would later name function composition. This goes on for sometime until I define function as a relation of two sets satisfying certain properties.
A student could ask me if associating a set with its size is an example of a function and I answer: "Although the idea is correct, we can't do that because our function would have no domain, because there is no such thing as the set of all sets."
The student is often disappointed because concepts he thought he understood (set as the extension of a property, like Frege's original idea, and a function as I taught) are not achievable by the mathematical entity called function and set.
How can I deal with similar situations in a encouraging way for the students, while mathematically rigorous and concrete?
(I apologize for eventual mistakes in the text as English is not my native language.)