Let's wait and see, though. Mr Abbott may simply swap one barrel of pork for another, by fast-tracking another huge project to build more warships in South Australia. That would be a big mistake because Australia does not need these ships, and even if we did it might be much better to buy them, too, overseas.

Meanwhile, Mr Abbott still faces a choice about where the subs should be built if not in South Australia. It now seems likely that he will decide to buy them from Japan. There are many good reasons to regard such a decision as a serious mistake, but Mr Shorten's thinly-veiled xenophobia is certainly not one of them. His ill-considered remarks last week confirm that he does not yet show the qualities of national leadership on such issues.

But Mr Abbott's headlong rush into a decision to buy from Japan is just as irresponsible. To see why we need to look both at the submarines themselves and at the wider strategic context. The Soryu-class submarine has a good reputation and it has the clear advantage of being much bigger, and therefore longer-range, than other boats on the international market. But it is not clear that the Soryu's size actually translates into longer range, and range, though important, is only one factor among many to be considered.

Moreover it would be rash to assume that the Soryu would be a low-risk, off-the-shelf buy. For a start, we would want to fit a quite different combat system to the boat, introducing lots of technical problems to be solved.

Above all, we know very little about these submarines, nor about the companies that build them. Japan has never sold a submarine overseas before and the Japanese Navy must be uneasy about sharing their secrets with others, making the project potentially very hard to manage. The boats themselves have not been systematically compared with the other options, and may well end up performing much worse, and costing much more, than the government seems to assume.