Let’s think back to ancient history – to, say, five or more years ago when the process of getting a ride in a big city involved standing on a corner and trying to wave down one of the taxicabs that zoomed by. Cabs usually were drab and smelled like air freshener. In bad weather, your chances of hailing one – without getting cold or soaked – was in the ballpark-zero range.

Drivers were reluctant to take credit cards, or fumbled with one of those sliding card readers from the Pleistocene Era. I recall standing in an outlying neighborhood in San Francisco late at night for nearly an hour as I repeatedly called an 800 taxi number to get a ride. Good times.

Think about that process now, thanks to Uber and Lyft. Getting an easy, comfortable and affordable ride might not match the eradication of polio, but this innovation has made our lives better. My 84-year-old mom, who no longer drives, regained her mobility thanks to Uber. Other app-based companies have been a boon. Companies deliver Mom’s groceries to her door. I order almost everything that way, from auto parts to cat litter to clothing.

This all is at risk now thanks to the union-driven efforts of California lawmakers, whose visions of the workplace are shaped by factories and cubicles. The Legislature is moving forward with Assembly Bill 5 which, as virtually everyone has noted, poses an existential threat to the new economy (and to some old-economy businesses such as newspapers, too).

AB 5 would codify the disastrous 2018 California Supreme Court’s Dynamex decision that makes it nearly impossible for these companies to use independent contractors as their workforce. The measure would require them to treat workers as permanent employees, subjecting the companies to the state’s laundry list of costly labor rules and driving up wage rates by 20 percent or more. It would eradicate the flexibility that’s at the heart of these firms’ business model.

The supposed goal is to improve the lot of drivers. The bill’s author, Assemblywoman Lorena Gonzalez, D-San Diego, pointed to “story after story of Uber and Lyft drivers living out of their car, homeless, barely hanging on.” There no doubt are some hard-luck stories, but the tales of woe that Gonzalez shared are at odds with my experience.

I’ve talked to a lot of these drivers, and they enjoy being free to work whenever they choose while they pursue other educational and business opportunities. I’ve yet to meet a driver who wants to be a 9-5 drone. And it’s hard to see how a measure that could devastate these employers would help the people that work for them.

A new study regarding Lyft by highly respected Beacon Economics finds that “increases in the cost of providing the service coupled with the introduction of formal work schedule arrangements, would likely lead to considerably fewer drivers working on the platform.” It found that Lyft alone would need 300,673 fewer drivers in California under some scenarios.

The study confirms what other studies have pointed out: The overwhelming number of drivers (95 percent, in this survey) say their flexible work schedules are “extremely important” or “very important.” Most drivers work less than four hours a week. “Drivers who use the service to supplement their primary source of income account for the largest share of workers in the service,” the study added.

In response to AB 5, these companies are offering a compromise that guarantees drivers a minimum hourly income, a benefits fund that could offer paid leave and a bargaining process for them to resolve disputes. That’s reasonable, but supporters are plowing ahead with a bill that exempts many professions, but not drivers, from the ABC test. The ride-hailing companies have vowed to sponsor a referendum to overturn it if it becomes law.

I’ve detailed what life was like for consumers when we relied on cabs. But let’s not forget what life was like for drivers. In 2013, San Diego State University and the Center on Policy Initiatives published a report called “Driven to Despair.” The city’s taxi drivers generally earned less than $5 an hour. Almost none had health insurance or workers’ compensation. The system “encourages taxi drivers to drive when tired or sick, and allows lax vehicle maintenance.”

Ironically, the lightly regulated ride-sharing companies have provided better working conditions and safety than the government-controlled taxi market, which forced drivers to pay off cab owners’ medallions – those limited, city-issued permits that cost tens of thousands of dollars. San Diego lifted its caps on medallions, but most cities still use the old system.

Nothing’s perfect in this world, but the ride-hailing platforms are far better for drivers and consumers than the previous models, even if that obvious point is lost on Sacramento’s legislative vandals. If AB 5 becomes law, just wait for the sob stories from drivers who can’t get work and from the rest of us who can’t get rides.