FAR BETTER LATE than never: Mayor Barry has now done what had to be done about jails and prisons and halfway houses and other important efforts to address a highly dangerous situation in the capital city. However reluctant he once was to face the fact that a new prison is needed here, the mayor has made good on his decision to pick a site and start building. With his commitment extracted, the Justice Department can -- and should -- resume relieving immediate overcrowding by taking inmates in federal facilities; the federal refusal to keep on doing this served as useful pressure on the mayor to settle on a site, as did a threat that some federal money for the project might be trimmed.

Other important moves announced by Mr. Barry Friday were a necessary response to court orders for humane treatment of all inmates -- the result of situations created by years of failure by local administrations to cope with increasing numbers of inmates sent them by the courts. The mayor has included many policies advocated by opponents of additional prison construction: various approaches to probation, custody, temporary employment, halfway houses, drug treatment and crime prevention.

Some may work, some may not; but the mayor is inviting not only a variety of approaches but also criticism from people in every ward, through special advisory groups. True, advisory groups more often than not are sops and not solutions. But in this instance, why not challenge the critics to participate in a more serious way? They may prove far more helpful than some of the council members who revel in easy-route prison politics -- opposing anything that isn't built in Virginia or, if absolutely necessary, the ward next door.

Even Mayor Barry concedes that his handling of the latest series of calamities as less than perfect. "You have the ball, you're tackled everywhere, and you're going to fumble the ball," he says, admitting that the uncoordinated shipping of inmates by bus to Pennsylvania didn't work and that the plan to use the old Ninth Precinct station house backfired. "There's pressure on you, and now we've responded with a good program."

How good is an open question, but it is good enough for the Justice Department to encourage and assist. It is not grounds for new federal demands for yet another 1,000-bed facility, for example. Acceptance of federal assistance should not be a license for the administration to issue unilateral directives or to reassume tight controls over local criminal justice functions that the home rule charter properly delegated to an elected government.

There has been too much posturing all over the place already. It brought the city perilously close to an explosive situation. There are still too many immediate troubles in the correctional facilities. Now, perhaps, they can get the concentrated attention that all the politicking has prohibited for so long.