One could state that is all depends on the glass itself. If the glass is too big or too small, this might magnify optimistic or pessimistic feelings. For the sake of the argument, let's assume that the glass is precisely the right size for the individual seeing it, and that it's filled (or emptied) to half of its capacity.
So, why should the glass being half empty be considered a bad thing? After all, if the glass is half empty, logic dictates that it has been completely full before. And so the individual holding the glass, has already had half a pint of beer (for example). Most of the time, this is a good thing. Therefore the individual holding the glass should at this point be in a happy state of mind, having already consumed half a pint of beer, with the prospect of consuming yet another half a pint. After that, the possibilities for happiness only increase. Another drink can be bought without a problem (one always looks silly buying a beer, while holding half a pint of beer in ones hand), or even better, another drink could be offered to the individual.
One question remains: Is a glass filled to half its capacity really a good thing? Such a glass doesn't seem to have the glorious past, nor the joyous future that could be associated with a half emptied glass. A glass like this could implie that there is not enough liquid left to fill it completely. On the other hand, it could also implie that the drinker only had enough money left to buy just half a pint of beer. In both cases, the drinker might be happy to have at least half a glass. But then again, the knowledge of it being the last glass of the day, might make him or her a very depressed person indeed.
Although the general opinion is that optimistic people see glasses as half filled, one could reconsider this opinion. One could ofcourse also put a stop to the discussion by making sure the glass is completely empty and order a new drink...