THE TIME HAS COME say what for more than six months has been almost unsayable. President Carter and the American public in general have from the beginning been guilty of a grievous error in their attitude to the American hostages in Tehran.

Consideration for the lives and safety of these (now) 53 Americans should never have been given the priority which it has been allowed. A nation ought not to permit its wider policy to be itself held hostage to the fate of its diplomatic officials abroad.

Diplomatic staffs are as much in the front line in peace as a country's servicemen are in war. Although an international code has been worked out over the years to try to ensure the safety of diplomatic missions, the very need for such a code is an acknowledgement that such missions may well find themselves in danger in the host countries. To be a diplomat in some parts of the world today is clearly as dangerous as it was in some parts of Europe in the time of Machiavelli.

There is no reason to apologize for turning again to "Satow's Guide to Diplomatic Practice," of which the fifth and fully revised edition was publised last year. In the chapters on attacks on embassies and kidnapping of diplomats, the new Satow is clear that all that the aggrieved government really can do in such circumstances is eventually to secure restitution and redress from the host government. At no time does he contemplate that other than diplomatic means will be used, or that the embarrassment of such incidents should be allowed to affect the high policy of the injured nation.

None of the attacks on diplomatic missions which he offers as illustrations were as severe as that in Tehran has become in the past six months, but they had characteristics in common, as can be seen in his account of the attack on the British mission in Peking in 1967 during China's "Cultural Revolution."

On June 7, 1967, there were officially inspired anti-British demonstrations in Peking. "An intrusion was made into the premises of the British Mission, in the course of which the royal portrait was damaged. (Since the portrait of the queen is the visible symbol of the head of state, Satow seems to regard its destruction as the ultimate violation, perhaps more serious than any injury to a member of the mission.)

There were other incidents in Peking until, on Aug. 22, a very large crowd of demonstrators entered the mission's compound and set fire to and sacked the chancery building which was completely destroyed.The fire naturally smoked out the members of the British mission, who included five women and were led by the British charge d'affairs, and they were physically attacked and beaten by the demonstrators as they tried to leave the building.

At this the Chinese Army -- which had been present throughout the outrages -- stepped in and rounded up the diplomats. These were, in effect, taken into protective custody. Although it was officially inspired, the demonstration was getting out of hand, and the Chinese moved to control it. But on Aug. 30 the members of the British mission were obliged to appear publicly before the demonstrators and base themselves and apologize for their country's actions. The charge d'affaires set the example by staunchly refusing to oblige. When the demonstrators then began to manhandle him, the Chinese army again stepped in to stop them.

In the following week Prime Minister Chou En-lai issued a directive to the Red Guards on the streets. As far as the missions of foreign powers were concerned, he said, the militants ought to be content to "demonstrate but not penetrate." This, at once, damped down the demonstrations, and four years later the Chinese government announced that it would bear the cost of rebuilding the missions's premises, although other British claims remain unsettled.

As I read this account of the incidents, I could recall only the dimmest memories of them, presumably because the British response was so muted: there was very little huffing and puffing, only a series of protests which established the grounds for restitution later, and a few restrictions placed on the staff of the Chinese mission in Britain. One of the protests was characteristically typed by the charge himself, and sent by him to the Chinese government by ordinary mail in the absence of the usual diplomatic facilities.

The Iranian government in the last six months has of course never issued any directive like Chou's, drawing the line at demonstration but not penetration, and so the American government has been faced with a very different situation as it has slowly and woefully developed. But one cannot help asking whether the emphasis which the United States put on the fate of the hostages from the very beginning did not make it difficult for any Iranian government to separate itself from the actions of the militants.

One may then turn to the general principles which the new Satow deduces from the illustrations he gives: "In an unstable political situation, an alert and well informed mission should be able, even without specific foreknowledge, to sense when disorder and perhaps violence are to be expected. In such a case, a request in advance to the government of the receiving state for special protection is a wise precaution in itself, and will strengthen the position of the mission and the sending nation in any later argument about restitution." The emphasis is always confined to the seeking of compensation for specific damage.

"The right to compensation should at once be reasserted" after an attack on a mission has actually taken place. "This kind of diplomatic action can and indeed should be taken without delay." The new Satow does not deny that such situations can be "extremely frightening and dangerous"; but the thought of making them the subject of major policy decisions by the injured government does not cross his mind.

The use of military force in particular would strike Satow as out of all proportion to the grievance. He even has a sharp word for the military attache in the British embassy in Indonesia who in 1963, when the embassy staff was being held in its premises by a large demonstration of "yound people," walked around the damaged building in the evening playing the bagpipes as "a gestrue of morale-raising definance," of which the new Satow says dryly that, "The local diplomatic effect of the gesture can hardly have been advantageous." Even to the extent, the military was getting out of hand. b

We now look back in disbelief at the kind of military action which was taken by Britain against the Emperor Theodore of Ethiopia in 1867-68, when he had five British diplomats and three Protestant missionaries chained as hostages on an impregnable mountaintop in his country.

Gen. Robert Napier was ordered to storm the impregnable mountaintop at the head of an army of 14,000 british and Indian troops and 27,000 camp followers. He entered Ethiopia with only the vanguard of this army but with 44 elephants which had been trained for mountain warfare. Theodore fired at Napier the artillery which earlier had been made for him by the Protestant missionaries. This included a gigantic cannon with the name of Sebastopol. But Sebastopol unfortunately misfired. Theodore then clapped to his head a pistol which had once been presented to him by Queen Victoria. But, more fortunately the pistol too misfired.

Theodore was grateful for this evidence that destiny might have intervened to preserve him. He released the hostages. But he then realized that he would now be taken prisoner, at which he again clapped the pistol to his temple and (as Thomas Pakenhan says) died like a gentleman.

Napier then left Ethiopia, his elephants now loaded with golden crowns and 348 priceless manuscripts, and leading by the hand Prince Alamayn, the 8-year-old heir, who was to be brought up as the adopted son of Queen Victoria. It all seems far away, those days when empire could do more or less what it liked, at whatever the cost, and indeed no matter how foolish the enterprise was by any standards.

Yet it is residues of something of those attitudes which have lurked in the American response to the holding of the hostages in Tehran, and which at last took the form of the attempt to rescue them.

The impulse to empire, which fitfully surfaces in America, is interesting and even worrisome to many Europeans, partly because the Europenas know from their own experience that the opportunity for empire no longer exists, but partly also because Americans (for good or for ill) have no natural instinct for empire. It is disturbing to see the lips and the fingers of even intelligent American conservatives twitch as they wish to throw thie country's might against little peoples, from Panama to Iran, who resist. For neither the occasion nor the will for such displays exists.

One factor which conservatives overlook is perhaps the most remarkable and proudest of the achievements of empire. Wherever the West has roamed in the world, it has carried with its arms and its commerce, and America still carries it today, the very ideas of freedom and equality with which empire is now everywhere resisted. These ideas were unknown in most of the continents of Asia and Africa and even South America until the West transported them there. The West has nourished they very ideas which now oppose it.

We may think thattso far the ideas have taken root only shallowly. There are few liberal or democratic regimes in what we call the Third World.But these countries are only at the beginning of the profound and permanent revolution which western ideas have provoked. We cannot sit too loftily in judgment and expect the transition to be always orderly and urbane. The agents of the West, from its missionaries to the transistor radio, which can now be heard even in the jungle, have stirred the revolution. The West cannot use the old instruments of empire, not because it is weak, as the conservatives say, but because it finds itself fighting its own ideas with its own ideas. It is far too late to send in the elephants to bring out hostages or a boy prince.

One is not arguing that the United States should have thought, talked or acted as if the fate of the hostages was of no consequence. But it is the public day-to-day concern with their fate which has given those who are hostile to America in Iran their opportunity to use the issue almost as a form of blackmail. It may even be true that, as many are agreed, this has prolonged their detention.

But the more serious cause for worry is that the desire for vengeance against the Iranians has distracted the United States from its long-term interests in the area and especially from the genuine threats from the Soviet Union. Those are the real concerns of high policy, and they ought not to be made to depend on the safety of 53 diplomatic officials who by their mission are always in the front line.

It is not right to put the blame on President Carter alone and to exempt, for example, the melodramatic way in which CBS ends its nightly news with the incantation, "And that's the way it is on this, the 185th day of captivity for the Americans in Tehran." That is inflammatory. It is also stupid.