The public would have been prevented from knowing the identity of a killer such as Luke Mitchell had the plans to extend the bar on the identification of an accused from under 16 to under 18 been in place at the time of his conviction.
Children's groups have welcomed the move to protect the identities of those accused of crimes, but it has met with strong resistance from the head of the body representing newspaper editors and a senior lawyer.
Mitchell, who was 16 when he was found guilty of murdering schoolgirl Jodi Jones, is currently detained without limit of time for a minimum of 20 years. John McAlinden, 17, and Jamie Gray, 16, who were involved in the murder of three men in a Glasgow flat in 2004, and Declan Robertson, 17, who murdered a teenage friend with a baseball bat in Edinburgh in 2011, would all have not been named.
Colin Gilmour, 17, who was detained for seven years for a knife attack on Imran Khan, 15, who later died, would also have escaped being identified in the press.
The identity of 16-year-old Steven Brownlie would also have been kept secret when his case came up before the High Court in 2006. A judge ordered him to be kept in the State Hospital Carstairs, pending transfer to another specialist unit, over his involvement in the death of a retired lecturer. It was ruled he was insane and unfit to plead at an earlier murder trial.
In all these cases, identification would have been allowed only once they turned 18.
Julian Calvert, chairman of the Society of Editors (Scotland), criticised the plans. He said: "It seems bizarre that this change is being proposed at the same time as the idea of empowering 16 and 17-year-olds politically by allowing them to vote in a referendum. If they're responsible enough to vote, why shouldn't they be publicly accountable for crimes they commit?"
He added the priority should be addressing the threats to the fairness of trials posed by jurors searching online for the backgrounds to cases. He also said that "often completely uncontrolled" commentary on trials on social media risks prejudicing the court cases.
Lawyer David McKie, a partner in Levy & McRae solicitors and head of media law at Glasgow University, also raised concerns that the plans appeared to protect accused people aged 16 and 17, but not witnesses. He said: "The difficulty with this proposed change is that it further restricts the court's discretion and it arguably undermines a basic principle of court reporting, which is openness.
"While most people would understand the need to protect the identity of victims on grounds of age, these proposals extend to accused persons too. They do not appear to prevent a person who is only a child witness being identifiable, yet if this had been in place during the Luke Mitchell trial, he would automatically have been anonymised."
Mr McKie added: "The court has, at present, powers to restrict reporting or to grant exemptions to anonymity as the law stands. This proposed change appears to restrict the court's discretion in such cases."
He cited the example of a 17-year-old prosecuted for a criminal offence. The accused would be seen and identified by anyone walking into the courtroom, but he or she might be married, have a driving licence and be in full-time employment.
He added: "It seems strange that, while understandably wanting to protect vulnerable witnesses, the Government has proposed to extend the law so widely to cover every accused person but not child witnesses who are not victims."
Scotland's Commissioner for Children and Young People, Tam Baillie, said: "Children involved in the justice system, whether as witnesses or accused, are children first and foremost and should be treated as such, for their protection and to avoid damaging 'labelling'."
Jackie Brock, chief executive of Children in Scotland, added: "We welcome the provisions made in the Victims and Witnesses (Scotland) Bill that raise the age of reporting of
crimes involving children and young people, to the age of 18. We hope this is a step towards eliminating some of the inconsistencies in the Scottish criminal justice system in relation to its treatment of children."
A Scottish Government spokesman said the proposal followed a recent EU directive establishing minimum standards on the rights, support and protection of victims of crime, which defines a child as including all those under the age of 18.
She said: "As a result, the bill raises the age of child witnesses from 16 to 18, and also raises the age for which reporting restrictions are required to 18 to ensure consistency."