As an alternative to a bathing suit some people use their trousers, underpants and or T-shirt as make-shift swimsuit. At beaches norms for this tend to be more relaxed than at swimming pools (especially indoor ones). However, swimming pools tend not to permit this, because underwear is unlined, may become translucent and, may be unclean.
History
In Classical antiquity swimming and bathing was most often done nude. In some settings coverings were used. Murals at Pompeii show women wearing two-piece suits covering the areas around their breasts and hips in a fashion remarkably similar to a bikini of c. 1960. After this, the notion of special water apparel seems to have been lost for centuries.
In the 18th century women wore "bathing gowns" in the water; these were long dresses of fabrics that would not become transparent when wet, with weights sewed into the hems so that they would not rise up in the water. The men's swim suit, a rather form fitting wool garment with long sleeves and legs, similar to long underwear, was developed and would change little for a century.
In the 19th century, the woman's two piece suit became common-- the two pieces being a gown from shoulder to knees plus a set of trousers with leggings going down to the ankles. In the Victorian era, popular beach resorts were commonly equipped with bathing machines, with the purpose of avoiding exposure of people in swimsuits (even though these were very modest by today's standards), especially to people of the opposite sex.
In 1907 the swimmer Annette Kellerman from Australia visited the United States as an "underwater ballerina", a version of synchronized swimming, diving into glass tanks. She was arrested for indecent exposure, as her swimsuit showed arms, legs and the neck. Kellerman changed the suit to have long arms and legs, and a collar, still keeping the close fit revealing the shapes underneath. She later starred in several movies, including one about her life.
After this, bathing wear began being less conservative, first uncovering the arms and then the legs up to mid-thigh. Collars receded from up around the neck down to about mid-way between the neck and nipples. The development of new fabrics allowed for new varieties of more comfortable and practical swim wear. On some beaches in the United States, men were prohibited from going topless as late as the 1930s.
Due to the figure-hugging nature of these garments, glamor photography of the 1940s and 1950s often featured people wearing swimsuits. This subset of glamour photography eventually evolved into swimsuit photography with the help of Sports Illustrated and swimsuit photographers around the world.
The first bikinis were introduced just after World War II. Early examples were not very different from the women's two pieces common since the 1920s, except that they had a gap below the breast line allowing for a section of bare midriff. They were named after Bikini Atoll, the site of nuclear weapons tests, for their supposed explosive effect on the viewer. Through the 1950s, it was thought proper for the lower part of the bikini to come up high enough to cover the navel.
From the 1960s on the bikini shrank in all directions until it sometimes covered little more than the nipples and genitalia, although less revealing models giving more support to the breasts remained popular. At the same time, Fashion designer Rudi Gernreich introduced the monokini, a topless suit for women consisting of a modest bottom supported by two thin straps. Although not a commercial success, the suit opened eyes to new design possibilities.
In the 1980s the thong or "tanga" came out of Brazil, said to have been inspired by traditional garments of native tribes in the Amazon.
