Shigeru Ban, the architect, says that the new restrooms in a park in Tokyo have "smart glass" that turns opaque when someone is inside.
Do you see someone inside that stall? I do.
Anyway, The Guardian explains that the purpose of using transparent walls, aside from inducing anxiety, is so permit people to know if a stall is unoccupied before attempting to enter:
“There are two concerns with public toilets, especially those located in parks,” it said. “The first is whether it is clean inside, and the second is that no one is secretly waiting inside.”
The glass allegedly becomes opaque after you lock the door. So don't forget to do that.
-via Dave Barry