Many millennials worry that they will never retire. The bad news is that traditional retirement may, indeed, be out of reach for a good portion of today’s young workers. The good news is that society might be able to adapt so that an extended working life could actually be something worth celebrating.

For the second half of the 20th century, most people in the American middle class expected to stop working around age 65. The next 10 or 15 years were theirs to travel the world, garden with the grandkids, and schmooze on the golf course. But today, people are living longer and healthier lives. This is a great thing—except that many of us simply do not have the savings to finance extra decades of leisure.

This is particularly true for millennials, who came of age during the Great Recession and whose financial prospects may have taken a permanent hit as a result. Many young people have also begun their careers with massive student loan debt. And so even if young people are responsible about planning for retirement savings, it’s likely that many of them will need to keep working past their early- to mid-60s.

Given this reality, the question we should be asking is how we can change what it means to have a longer professional life.

As a start, we need to acknowledge the benefits of working longer. Not only is it a chance to improve financial security, it can also help people maintain a sense of purpose in their lives and remain socially connected with others. Research suggests that older people who stay in the labor force longer have fewer ailments than those who retire earlier. By that logic, a thriving workforce can also keep the ever-rising cost of health care and caregiving in check. And a large workforce will also expand the tax base and generate government revenue.

Postponing retirement will only be a good thing if we change the nature of work.

But postponing retirement will only be a good thing if we change the nature of work. The first step that companies should prioritize is developing mutual respect and engagement between age cohorts. Many organizations are now realizing the importance of multigenerational cultures and investing in age-neutral workplaces.

This will require retrofitting workspaces with features that support the health of all people and accommodate the needs of older employees. BMW, for example, has debuted a pilot project for older workers on assembly lines. The company altered equipment, from chairs and floors to footwear and worktables, to ease workers’ physical strain. These changes cost roughly €40,000. But they have already paid significant returns, including a 7% increase in productivity and reduced absenteeism.

Companies must also begin offering lifelong skills training to their employees. Opportunities for education and skills enhancement need not end in young adulthood. Ongoing instructional programs can keep people apprised of best practices in their fields and allow them to stay up to date on the latest advances in technology. Encouraging employees to spend part of their workdays taking advantage of online offerings through Coursera or edX, for example, will prove to be cost-effective. Skills training also includes mentorship, which can be a two-way street between generations. Some businesses are already exploring “reverse mentoring,” in which younger and older workers exchange their expertise about the areas they know best.

Incorporating flexible schedules can also help older workers. Singapore’s Retirement and Re-employment Act, which ensures reasonable employment terms and commensurate pay for older workers, is a perfect example. Employers are required to offer one-year reemployment contracts to eligible employees from age 62 through 65. Guidelines also encourage employers to offer voluntary reemployment through age 67. The government provides employers with an incentive by offsetting up to 3% of an employee’s monthly salary if he or she is age 65 or older. This method considers the perspectives of both the older employee and employers who need skilled, competent, and healthy workers.

Technology will make a new kind of working life possible.

This model would likely be difficult to replicate in other countries. But the success of Singapore’s program suggests that other countries can take their own steps to make sure older people get appropriate opportunities in the workplace.

Communities, cities, and policymakers should also play a dynamic role in bringing about a new era of late retirement. In the past few years, many people have become more conscious about the need to create infrastructures for “successful aging.” This involves age-specific healthcare needs, housing and transportation, education, retraining and job opportunities, and social and community connectedness.

I predict that this momentum will continue out of necessity. By the time millennials reach a traditional retirement age, many such infrastructures should be readily available.

Technology, too, will make a new kind of working life possible. Self-driving cars may be a boon for older workers who have lost the ability to drive or lack easy access to public transportation. And it is clear that technology like video conferencing and virtual reality has the potential to make remote work a lot more feasible.

Even with the possibility of more flexible workplace policies and better infrastructure, of course, some people may be depressed by the idea of working in perpetuity as a sales rep or corporate lawyer. But it’s important to note that extending our professional lives does not necessarily mean we must pursue a single, primary career forever. A longer professional life may give us the chance to apply our skills in new areas or to change careers later in life, with the knowledge that we still have a good number of working years left.

We all want to have vital, healthy lives that offer us a sense of purpose and meaning. Our jobs are not the only way that we can achieve these goals. But since many of us will have to work anyway, we must strive to turn necessity into advantage.