You're talking about holding the temperature of the water, right? As far as containing the liquid, they're about equal...but a styrofoam or double-wall plastic cup would hold temp better than a glass cup which would work better than a single-wall plastic cup.
Glass is a better insulator than plastic, meaning it is better at keeping the temperature of its contents stable. Glass has a lower thermal conductivity compared to plastic, which helps to prevent heat transfer between the water inside and the surrounding environment. This makes glass more effective at keeping water colder for longer periods of time compared to plastic.
paper
Water has a density of about 1.0, knowing this you can tell if an object will sink or float by calculating the objects density.
conductors
mugs,foam cups and plastic cups
Foam is NOT plastic!
Yes, plastic foam will typically float in water due to its low density. This makes it useful for applications where buoyancy is required, such as in flotation devices or surfboards.
Glass is a better insulator than plastic, meaning it is better at keeping the temperature of its contents stable. Glass has a lower thermal conductivity compared to plastic, which helps to prevent heat transfer between the water inside and the surrounding environment. This makes glass more effective at keeping water colder for longer periods of time compared to plastic.
Refrigerators and freezers have plastic foam core as it is the most resistant to the low temp inside the compartment,but even Teflon can be used
to stop condesation of water from the surface of pipe.
Foam will insulate better than plastic.
Foam lets extra cold air reach the water
Yes, you can get cold foam on a hot drink.
Assuming the foam is from furniture stuffing, then the answer is no. Such foam is plastic and is definitely not edible.
To properly winterize water pipes and prevent freezing and damage during colder months, you can insulate pipes with foam sleeves or heat tape, seal any gaps or cracks where cold air can enter, and allow a small trickle of water to flow through faucets during extremely cold temperatures to keep water moving. It's also important to disconnect and drain outdoor hoses and sprinkler systems before winter sets in.
paper
Polystyrene is a plastic. I think you meant "polystyrene foam", which would be correct.