D.C. Taxicab Commission Chairman Ron Linton thinks Uber, a new service that lets people reserve luxury-sedan rides from their smartphones, is illegal. If he’s right, then something is wrong with the law, not with Uber.

The San Francisco startup launched in the District last month, but on Wednesday, Linton told a taxi driver, “They’re operating illegally, and we plan to take steps against them,” TBD’s John Hendel reported. On Friday, Linton himself participated in a sting, personally hiring an Uber car so that hack inspectors could ticket the driver and impound the vehicle. Linton says that only taxicabs may charge riders by time and distance.

I’ve never taken Uber, and I don’t especially plan to. I’ve generally found I can get a cab when I need to or can use the Taxi Magic app to call one. I honestly don’t feel strongly about whether Uber succeeds or fails.

But it deserves a chance to succeed, and so does anyone else who thinks they can build a business by safely making transportation better. This is a metropolitan area with many different transportation needs, and though there are many modes available, we can use more options.

Taxi drivers, who provide transportation at lower fare rates than Uber, complained that Uber is providing taxi-like service but not being regulated like taxis. This is analogous to Safeway complaining that some new cupcake shops are offering cupcakes at higher prices, and potentially higher quality, than Safeway’s bakeries do.

That would be silly, of course. After all, in most businesses lower prices are better than high prices, so Safeway’s less costly cupcakes could be an advantage, not a weakness. And if there’s a market for the quality offered by the boutique shops, Safeway could always offer more gourmet cupcakes.

The difference is that we don’t regulate cupcake prices, but we do regulate taxi fares. We don’t need to regulate cupcake prices. You can buy a cupcake, or not. You can shop around to various stores or ask friends where the quality and prices are best.

With taxis, you can’t shop around. If you’re standing on the street, you’re not going to wave over three cabs, ask them all for their prices, then pick one to get into. Therefore, cities set fixed rates for taxi rides and require anyone picking up passengers on the street to adhere to them.

Also, cities have an interest in making sure taxis will transport people anywhere in the jurisdiction, not just to the places that are most profitable or where they’re most likely to get a return fare. We’re understandably a lot more concerned about taxi deserts than cupcake deserts.

Maybe one day this will be unnecessary. If everyone had a smartphone, people might not have to hail cabs by raising an arm on a street corner. Anyone could simply pull up an app to make a request, and they could compare the prices for multiple companies right away.

The app could also show dynamic ride-sharing options, which make it possible for private drivers already headed in your direction to give you a lift for a fee. Companies like Avego and PickupPal already do this, and Avego has a limited pilot program going just for Defense Department employees traveling to and from Fort Belvoir, Quantico and the Mark Center.

It’ll be many years before the technology is advanced and widespread enough to largely do away with street hails. In the meantime, rather than banning Uber, the Taxi Commission could take the opposite tack: Deregulate rates, but only for rides procured by phone or app, not for street hails.

Let any company offer rides to the public, at any rate schedule they wish, as long as its drivers meet certain safety requirements and the fares don’t discriminate against disadvantaged areas. (There would have to be more specific rules about exactly what that means.)

And require each of those companies, including Uber, to publish these rates publicly in an open format, just as transit agencies have done with their schedules or Capital Bikeshare does with its dock availability. That would let anyone who wants to create a Web site, smartphone app or other service to let people compare rates. Riders could have all the options right at their fingertips.

If Uber can find a market segment willing to pay $15 and up for more luxurious rides, good for it. I’m sticking with the regular cabs, but then I don’t really like upscale cupcakes that much either — though I’m glad they’re not illegal.

The writer is the editor of the blog Greater Greater Washington. He participates in The Post’s Local Blog Network.