[In] "Terminator 2" Arnold Schwarzenegger would portray a good Terminator instead of a bad one. Had this been kept a secret, it would have packed a wallop. Knowing the twist beforehand neither ruins the overall movie-going experience nor damages its integrity, but it's not unlike being aware of the identity of Luke's father while watching The Empire Strikes Back.
It's an exhausting experience and, even 18 years after its release, few films have matched it within the science fiction genre for sheer white-knuckle exhilaration.