Oh boy, opening up with Krugman. I can see the Neo-Classicists who try to paint all Keynesian thought of every worthwhile economist in the past half century as a delusion spread by the "evil" Krugman getting ready to swarm already.
OK, first, it's probably worth bringing up a basic link to
Comparative Advantage itself, because Krugman isn't talking about what Comparative Advantage itself, but the reaction to it.
Anyway, this is basically all the stuff that Toady does want to address already. The only question, really, is how.
The single biggest problem is that caravans are just too tedious, manually intensive, and just don't supply you with enough materials to replace internal manufacturing.
A
major portion of the problem is the silly amount of value multiplication done for the quality of goods you produce. Dwarves can very easily hit legendary, and pump out goods worth 5 or 12 times the value of the other things they are trading for. There is also the problem of raw materials and finished goods - finished goods are often worth 10 times as much as the raw material that makes them, so players often just import the raw materials and export the finished goods. That, alone, means you can import goods for the raw material value, and then sell it back for up to 120 times the raw material value.
Of course, the notion of importing the raw materials and exporting the finished goods at massive profit
is realistic. That's what nations like Japan were doing to get so rich off of nations like Australia - Australia had plenty of natural resources they weren't developing themselves for a long time, but were willing to sell their resources to the Japanese, who would gladly buy their resources, turn them into finished goods, and then sell them back for a massive markup.
However, Australia recognized the problem in its trade deficit, and took steps to correct it, and started developing its own industry. Of course, doing that indelicately opens up the can of worms of protectionist trade policies...
In order for these sorts of things to work, however, in the same way that hamlets are set up to provide food to cities, labor camps (which may just be hamlets, as well,) need to be set up to provide other materials from the places that they exist. Current willy-nilly settling of land will result in plenty of types of goods that are completely untapped, while others are overtapped.
Beyond that, there are not enough actually divergent
types of goods to trade in. Nearly all stones are basically the same, so why worry what you quarry? All wood is basically used for the same things, too. No metal but iron, maybe copper and bronze (tin) really matters. Glass and ceramics? They don't do anything wood and stone don't do already.
Without reworking the way the internal economy works so that people actually NEED these different kinds of goods, it makes no difference.
Toady has talked about how he intends to make farming much harder for dwarves so that they must import food from humans and elves.
So what if dwarven farms are nerfed? They still have turkeys producing tremendous amounts of eggs with no feed requirements, and their leather makes clothing.
For comparative advantage to work, you need goods to
cost more for a given culture to produce them. Until we have the internal mechanics of having to pay dwarves for their work again, this can only make sense in terms of how much labor it takes to make a good. Elves must somehow produce a good with less labor than a dwarf does... but there is nothing in the game that does this. Every good takes the same amount of labor to produce - one harvested raw material, and one step in a workshop. In fact, the act of using the trade depot is more work than any other single industry. The "cost" (in the only currently meaningful definition of the term - effort and time on the part of the player) of
trading itself is greater than the "cost" of just making it yourself.
Anyway, DF needs two major economy overhauls - one internal to the fortress, and one external.
The internal mechanics of the fortress are even more bare-bones and silly than the external one. (The internal economy was such a mess that it basically was just removed entirely.)
Basically, the work that has to be done to make any of this make any sense is more monumental than most people realize.