Sex and relationship education has always been important, but in the modern age it is more important than ever.

Calm, sensible learning about sex is crucial to avoid children seeking inappropriate information from alternative sources such as the internet. Concerns about attitudes to sex and relationships being learned by young adults of both sexes from online pornography are growing.

Meanwhile new technologies bring new threats, with young people more likely to explore relationships, feelings and boundaries through the 'sexting' of naked photos than through the games of 'doctors and nurses' of years gone by.

A transformation in social attitudes to same-sex relationships, including the advent of same-sex marriage, means children today need an education which recognises and respects the possibility of loving relationships of all types. Young people, of course, are generally the most accepting sector of the population when it comes same-sex relationships, although it is clear that a sizeable majority of adults now find the notion unproblematic as well.

It is important that other views are still respected, but this is a complex area.

The government's new guidance does provide for teachers who have an objection to aspects of the sex education programme. And there is no duty on a school or individual teacher to support, promote or endorse one type of relationship over another, the rules explain.

But the guidance says sex and relationship education should acknowledge that same sex couples can marry and it should be inclusive of and responsive to all, regardless of their sexual orientation.

At the same time, ministers say the government has no intention of changing the current position of Catholic schools, where 'faith aspects of the curriculum' are determined by the Scottish Catholic Education Service.

Some would argue that this should be irrelevant. While respecting individual beliefs is vital, children from all backgrounds and faith groups have a right to the facts.

In reality, there is a substantial crossover between the content of this guidance and matters of values and morality. Equal marriage is a fact, but the guidance also covers healthy relationships and parenting education - both, incidentally, very much welcome, but reasonable areas for a faith-based input.

Still there is some validity to the concerns of groups such as the Humanist Society of Scotland and the Scottish Secular Society. It is possible to teach children facts about sex and relationships without impinging on matters of faith.

Th secular groups may be wrong to assume the one in five children educated in faith schools will not get these facts. We do not know that for sure. It is also hard for a child to be withdrawn from all lessons in the curriculum where relationship, sexual health and parenting issues may be discussed.

Deeply held beliefs must be respected. But if the Scottish Government believes 80 per cent of Scottish children deserve high quality factual information about sex, relationships and parenting, then that must hold for the other 20 per cent too.

Faith schools do appear to have been handed an effective opt-out in relation to the new guidance in its entirety. This is an unfortunate and somewhat timid approach.