NEW YORK -- Johannes Miquel, a fervent 19th-century socialist, was with a friend when approached by a beggar. The friend reached into his pocket, but Miquel stopped him, exclaiming: ''Don't delay the Revolution!'' That seemed humane if you believed that destitution is caused by capitalism and can only be cured by revolution and that revolution is delayed by charity or reforms.

Today, there are radically different proposals for responding to solitary homeless persons who live on city streets. Most are mentally ill. Many are the sort who, a few generations ago, were in institutions.

One reason deranged homeless persons are today so conspicuous is that three decades ago a new pharmacology and a new ideology intersected. The ideology, ''deinstitutionalization,'' rejected not only the deplorable practices in many institutions but even the principle of institutions. The pharmacological development was in psychotropic drugs that supposedly made it possible to act on the ideology.

New antipsychotic drugs made possible the control of psychotic episodes. But although the drugs eliminated deranged behavior, that elimination did not itself necessarily transform the patient into someone certain to function competently in society.

For some, whose psychotic episodes are rare, the drugs are sufficient to make them socially competent. But for many people, the drugs do not stop the deterioration of personality. As they suffer the pathologies and victimization of dereliction, they lose even the discipline to take the drugs.

Today the homeless are again making headlines because New York City recently adopted the policy of removing the ''severely disturbed'' homeless from streets for involuntary hospitalization. State law permits that -- when there is substantial risk of physical harm to the person or to others. The first person removed was a woman who had lived nearly a year in front of a hot-air vent on Second Avenue near 65th Street.

There ensued a typically American argument, one impossible to caricature.

A judge ordered her released, in the grand progressive tradition (as with Miquel) of using the poor for large political ends. He said that society, not she, is sick (''the blame and shame must attach to us'') and, anyway, the sight of her may improve us. By being ''an offense to aesthetic senses'' she may spur the community to ''action.'' Her four sisters, who learned about her on television, said it was ''racist'' and ''sexist'' for him to say ''the streets are good enough for her.'' But the New York Civil Liberties Union rhapsodized that the ruling was ''eloquent, sensible.''

The judge was unimpressed by the fact that the woman had a history of drug abuse and psychiatric hospitalization, defecated on herself, destroyed paper money during delusions, ran into traffic, shouted obscenities, was inadequately clothed for winter sleeping outdoors and was found by city psychiatrists to suffer from paranoid schizophrenia and to be delusional and suicidal. The Civil Liberties Union psychiatrists found her rational, dealt with her practice of running into traffic by noting that many New Yorkers jaywalk and diagnosed her destruction of money as an assertion of autonomy.

The judge praised her humor, pride, independence and spirit, said she has shown an aptitude for survival on the streets. Besides, he said, freedom is a constitutional right ''no less for those who are mentally ill.''

A higher, perhaps saner, court has barred the immediate release of the woman, giving New Yorkers time to think this: we are approaching this problem characteristically, which is to say backward. We are focusing exclusively on the individual, and in terms of his or her rights. But the community, too, has rights, needs and responsibilities that, if attended to, will leave the homeless better off.

The judge made much of the fact that psychiatrists disagree and that psychiatry does not attain the precision of mathematics. That does not mean that psychiatry cannot come to defensible conclusions, but let us delay the entry of such experts into this process.

Let us pretend that all people sleeping in filth and foul weather are as sane as sages. That is beside the point, which is: there can be no reasonable right to live on sidewalks.

Society needs order and hence has a right to a minimally civilized ambience in public spaces. Regarding the homeless, this is not merely for aesthetic reasons because the unaesthetic is not merely unappealing. It presents a spectacle of disorder and decay that becomes a contagion.

The community has a responsibility to provide shelter, in exchange for which it can require, as appropriate, work or treatment. The community also has a responsibility to remove judges who express such thoughts as: ''To the passerby seeing her lying on the street or defecating publicly, she may seem deranged,'' but ''she may indeed be a professional in her life style.''