Every few decades the same panic returns wearing new clothes. Factories would make craftsmen obsolete. Tractors would starve farmhands. Computers would eliminate clerks. Now the fear is that artificial intelligence will finish the job and render most human labor worthless, because a machine that codes and cooks and writes and diagnoses better than the average worker leaves the average worker with nothing left to sell. The fear is understandable. It is also wrong on the economics and right on the politics, and most commentary gets those two exactly backward.
Take the simplest case. One man cooks better and codes better than another, so common sense says the inferior man has nothing to offer. Ricardo's insight begins elsewhere: what matters is opportunity cost. If the superior producer gives up far more valuable coding time whenever he steps away to cook, while the inferior producer gives up relatively less, both gain when the better coder specializes and the weaker man handles the kitchen. Mises extended this into the law of association and made the point with unusual bluntness: even the more talented and the less talented gain from cooperation when their relative productivities differ, because the division of labor does not ask who wins every contest in absolute terms but where each participant gives up the least by concentrating effort in one line and obtaining the rest through exchange.
Most people misunderstand this by framing it as a comparison against someone else. It is not. Comparative advantage is a comparison against yourself. You ask which of your own activities you sacrifice the least by giving up, and you concentrate on the other one. The weaker worker does not look at the stronger worker's skills and despair. He looks at his own menu of options and asks where his time costs him the least to redirect. If he is bad at coding and mediocre at cooking, cooking is where his personal opportunity cost is lower, and that is where he belongs regardless of how the other man performs. The question is always internal: given everything I could be doing, which activity costs me the least to abandon?
Now suppose somebody builds a machine that cooks better than the weaker worker and codes better than him as well. If its full cost, including capital, maintenance, oversight, and error correction, still comes in below the value of the weaker worker's output, then the result inside that narrow bundle of tasks is real and severe: the machine displaces him. The superior human codes, the machine cooks, and the old bilateral trade disappears.
Nothing in comparative advantage forbids this outcome, because the principle never promised every person a permanent wage inside a fixed list of jobs. It says that gains from specialization arise wherever relative costs differ among feasible producers, which means that once the machine enters production and the comparison changes from two men to two men plus a capital good, the weaker worker may lose every saleable edge in that local contest.
Here is where the popular discussion goes off the rails in both directions. One camp treats the machine as an apocalypse: if AI outperforms the weaker human in both cooking and coding, the weaker human is finished, period, buy him a universal basic income and apologize. The other camp waves Ricardo like a talisman: comparative advantage guarantees everyone a role, relax, the market will sort it out.
Both are wrong because both confuse a theorem about allocation with a prophecy about wages. Comparative advantage tells you that specialization according to relative cost produces gains. It does not tell you that every participant will like the wage attached to his new specialty. A man can retain a comparative edge in washing dishes after AI takes his coding and cooking work, yet washing dishes may pay a quarter of what coding paid. The theorem is satisfied. The man is ruined.
The interesting question is what actually happens next, and it starts with something the doomsayers always forget. The machine is a capital good. It does not show up at the market pursuing its own plans, choosing its own ends, or bearing its own losses when a bet goes wrong. Somebody bought it, deployed it, and bore the risk that it would earn more than it cost. The owner chose the ends. The machine executed the means. Every unit of machine output traces back to a human decision about what consumers will want, how to combine resources to serve that want, and how much uncertainty to shoulder in the process.
This distinction matters because it reveals the margins where the displaced worker still has something to sell. He is not competing against an autonomous rival. He is competing against someone else's capital, and capital always leaves gaps. The machine writes code, but somebody must decide which code to write, must judge whether the output actually solves a problem for a particular customer in a particular context, must carry liability when the system fails at two in the morning, and must earn the trust that makes a nervous client say yes. The machine generates recipes, but somebody must show up at the restaurant, manage the kitchen when a delivery is late, and calm a customer who found a hair in the soup. These are not make-work consolation prizes. They are genuine services that persist because they depend on presence, judgment, accountability, and embodied trust that no model weights can replicate.
Modern labor economics has converged on the same observation from a different direction. Recent work on automation and new tasks distinguishes displacement from reinstatement: technology removes labor from one set of tasks while opening new tasks in others. Research on generative AI finds something similar inside occupations, where some workers lose routine functions while others gain from the higher value of supervision, judgment, exception handling, and client interpretation. When costs fall, entrepreneurs discover margins that were invisible at the old price structure. The loom killed the handweaver's old job and opened the garment industry to a hundred new ones, and nobody drawing up the bill of indictment against the loom in 1810 could have specified those new jobs in advance, because the jobs emerged from entrepreneurial discovery under changed conditions.
Still, the cheerful version of this story is too easy, and honest argument demands saying so. Smart machines are unusual capital goods because they scale across domains that once looked safely human, and they do so at a speed that compresses the adjustment period. A loom displaced weavers in one line of work and left the rest of the cognitive order intact. A strong language model can touch law, customer support, marketing, software, research, and education in the same quarter. The number of people who can quickly find a new paying margin may fall for a long stretch, and the wages attached to the margins they do find may be lower than what they earned before.
The distributional question enters here with particular force. If the superior worker can trade with a machine he owns, the gains from that new association flow to him. If a handful of firms control the frontier models and rent access to everyone else, the gains concentrate among those firms. Comparative advantage still governs allocation under either scenario, but allocation and distribution are different questions, and the man who retains a comparative edge in a low-value residual niche while someone else collects the rents on machine capital has not been refuted by Ricardo. He has been impoverished by circumstance.
And this is precisely where the state enters the picture as the real villain of the story. The displaced worker's recovery depends on how quickly new margins open and how freely he can move into them. Occupational licensing blocks him from trying a new trade without fifteen hundred hours of schooling he does not need. Zoning law prevents him from running a business out of his home. Regulation buries him in compliance costs before he earns his first dollar. Credentialing cartels protect incumbents from the competition he would bring. If AI compresses the adjustment window while the state simultaneously walls off every new margin with permits, licenses, and fees, the result is not a failure of comparative advantage. It is the state making the transition as painful as possible for the people least able to absorb the blow.
The broader economics is clear enough: no law of economics promises that the market will preserve inherited wages or familiar routines for the sake of psychological comfort, but production still begins with human ends and moves through capital combinations assembled under uncertainty for consumers whose subjective judgments no engineering metric can settle in advance. Those conditions keep opening new margins, and they keep doing so because nobody knows beforehand which combination of people, machines, prices, and tastes will satisfy tomorrow's demand. The entrepreneur who discovers that combination bears the risk and earns the profit, and that function remains irreducibly human.
The real question after AI is not whether comparative advantage survives. It does, because it must, because it is a logical implication of scarcity and differing opportunity costs among producers, and no amount of machine intelligence changes those two facts. The real question is whether ordinary people can reach their new margins or whether the state will fence them off, and whether ordinary people can own productive capital or whether they will rent their economic lives from those who do. Smart machines relocate comparative advantage away from wage labor inside the old task bundle and toward entrepreneurship, ownership, judgment, embodied service, and the countless margins that only emerge after old cost barriers fall. The displaced worker still matters when he can find one of those margins. If the state will not let him look, the machine is the least of his problems.