Louise Machinist, a Pittsburgh clinical psychologist, had noticed that her ex-mother-in-law, who lived alone, was lonely in a large house in Upstate New York. Since her ex-mother-in-law didn’t need all that space, and because the home was expensive and difficult to maintain on her own, maybe she could live with one or two others, Machinist suggested.

That idea didn’t fly with her former mother-in-law, but it did get Machinist thinking: When she herself got older, rather than living solo and feeling isolated, why not share a house with other single women? She mentioned the idea to church friends Karen Bush and Jean McQuillan. The suggestion of shared housing intrigued them, too—and not just for the future.

Bush traveled for work and was tired of scrambling to make arrangements for her cat and fish. And McQuillan, a recently divorced nurse, had moved to a rental apartment that provided no equity.

So, in 2004, Machinist, McQuillan and Bush became the proud owners of a $395,000, five-bedroom colonial, each paying one-third of the mortgage. “We could never have afforded it on our own and we have so enriched one another’s lives,” says Machinist. With a book they co-wrote called My House, Our House, they have also created a how-to primer for others on shared housing.

Last year, when Machinist retired, they sold their Pittsburgh house. McQuillan, 72, opted to stay in the area to be near her daughter and grandkids, whereas Machinist, 70, and Bush, 68, headed to Sarasota, Florida. There, they purchased a three-bedroom condo in a pink and white stucco building across from the bay.

“Moving down here alone after decades in Pittsburgh would have been frightening,” says Machinist. “Karen and I have very independent lives but it’s nice to have someone to come home to. Living with a friend is a great option for baby boomers and a fabulous way to enjoy retirement.”

There used to be three choices when you got older: live alone, move in with family, or relocate to a traditional long-term care facility. But things have changed. There are now a variety of different housing options: shared housing; cohousing; niche communities and more. Here’s what’s hot in housing for baby boomers and older adults:

Cohousing

Besides the shared housing option Machinist, McQuillan and Bush embraced, another increasingly popular alternative is cohousing. Here, you share a “common” house and outdoor space with other residents, but you have your own place.

The common house has a kitchen and dining room for meals (often made by residents once a week or so) and a space to hang out, watch movies, play board games, and have meetings and celebrations. Other rooms might be for computers, music, ping pong, working out or a guest or caretaker suite—whatever residents want.

The cohousing community can be either intergenerational or age-based, and in a city, suburban or rural area. For communities that are under construction, residents can plan and design their cohousing community from the ground up. All decisions are made by consensus.

According to national cohousing experts and husband and wife architects Kathryn McCamant and Charles Durrett, there are more than 120 intergenerational cohousing communities in the U.S., with less than ten for older adults exclusively. “As an empty nester, having kids in my life is one of the things I love about cohousing,” says McCamant, who, along with Durrett, designed Nevada City Cohousing in Nevada City, California, where the couple lives.

Their daughter Jessie grew up there, having on-the-premises playmates and surrogate parents and grandparents. Those “grandparents” are also surrounded by people of all ages— single, married, young families with kids, and retirees—who care about them.

An up-and-coming model: intergenerational communities with a social mission. Bridge Meadows in Oregon, Hope Meadows in Illinois and New Life Village in Florida, are built around supporting traumatized children from state foster care and their foster or adoptive parents.

“Treehouse is an ideal place to continue to be useful,” says Mary Steele, 82, a retired guidance counselor. Treehouse kids have slept over and she helps out with a five-year-old boy when his mother is at work.

Niche Retirement Communities

Are you a budding artist, an avid boater, an RV enthusiast or a lifelong learner? Andrew Carle, a professor at George Mason University and senior housing expert, foresees a future with an infinite number of special interest “colonies.” They could be for dog lovers, environmentalists, or meditation enthusiasts. Who knows, maybe there’ll even be a Pokémon Go community!

One growing niche community is geared toward older LGBT individuals. These adults often face discrimination by staff and residents in traditional elder facilities or feel they have to hide their sexuality. Most LGBT projects focus on affordable housing, but Fountaingrove in California’s Sonoma Valley feels like a five-star hotel with long-term care.

Developers have learned that education also sells. There are more than 60 “university-based retirement communities” affiliated with colleges around the country (e.g., Cornell, Dartmouth, Notre Dame, Oberlin, Penn State, Stanford.) Residents can take classes at the colleges or on their own “campus” (which offers independent- and assisted-living, as well as skilled nursing care).

Other not-your-grandma’s niche retirement communities include:

  •  Nalcrest in Florida is for postal workers.
  • ShantiNiketan, also in Florida, is for Indian Americans. It provides a prayer room and different cuisines from across India.
  • Lake Weir Preserve in Central Florida offers gigantic garages (2,000-3,000 square feet) which are often bigger than the houses. These garages can fit an RV, a boat, or a car collection–one even sports a man cave!

In a society in which one out of three baby boomers is single (i.e., widowed, divorced or never married), older adults are finding new ways to build community in later life. Living with or near others can be cost-effective, stave off loneliness, provide a sense of purpose and belonging, and create new “families” and surrogate caregivers. Forming relationships can be especially important because even when adults have grown children, they may live across the state or country.

There’s a projected future shortage of caregivers—yikes, the oldest of those “baby” boomers turns 70 this year and there are many millions following close behind! There’s also a financial impact: longevity can be great, but it costs money to live longer. Sharing expenses and property can be a smart business move.

“We have had to become more creative and expansive in the ways we think about family,” says Bella DePaulo, a Santa Barbara, California, social scientist and author of How We Live Now. “Biological and marital ties are now optional.”

Keep Reading: Most and Least Affordable States to Retire