The sense of festivity, which corresponds to pity in tragedy, is always present at the end of a romantic comedy. This takes the part of a party, usually a wedding, in which we feel, to some degree, participants. We are invited to the festivity and we put the best face we can on whatever feelings we may still have about the recent behavior of some of the characters, often including the bridegroom. In Shakespeare the new society is remarkably catholic in its tolerance; but there is always a part of us that remains a spectator, detached and observant, aware of other nuances and values. This sense of alienation, which in tragedy is terror, is almost bound to be represented by somebody or something in the play, and even if, like Shylock, he disappears in the fourth act, we never quite forget him. We seldom consciously feel identified with him, for he himself wants no such identification: we may even hate or despise him, but he is there, the eternal questioning Satan who is still not quite silenced by the vindication of Job… . Participation and detachment, sympathy and ridicule, sociability and isolation, are inseparable in the complex we call comedy, a complex that is begotten by the paradox of life itself, in which merely to exist is both to be part of something else and yet never to be a part of it, and in which all freedom and joy are inseparably a belonging and an escape.
Northrop Frye, from A Natural Perspective