One of the basic functions of any parliament in the world is to make laws.
There are many hurdles to overcome before legislation makes it onto the statute book. The process is designed to be as rigorous as possible, with vital checks and balances in place to avoid mistakes.
However, a change in the law, or a clause within that law, can have unintended consequences.
A good example of this is a bill making its way through the Scottish Parliament right now.
The Hate Crime and Public Order (Scotland) Bill was drafted with the best of intentions.
I think most reasonable people would agree that racism, hate speech, or discrimination against minority groups should be punished.
However, the way in which this bill is drafted has caused a great deal of concern.
One section suggests “stirring up hatred” could be deemed a criminal offence – even if there is no intention to do so.
Opposition to the bill has been wide-ranging. The author Val McDermid and the actress Elaine C Smith were among 20 Scottish writers, comedians, and artists to sign an open letter to Nicola Sturgeon to say it could “stifle” freedom of speech.
Legal body the Faculty of Advocates said that, as it stands, the bill could potentially criminalise social media posts made “on a daily basis”.
And the Scottish Police Federation said officers could end up “policing what people think or feel”.
It seems clear that this legislation must be re-drafted before it becomes law.
That would not be unusual. It happens in both the UK and Scottish parliaments – and indeed in parliaments all over the world.
However, as things stand, the SNP government is sticking by the bill.
Justice Secretary Humza Yousaf has repeatedly argued that the law will not prevent anyone expressing controversial or offensive views.
He states that this can still happen, provided it is not done in a way that could “stir up hatred”.
But that can be very difficult to define.
We all know, for example, that there is a huge amount of abuse that flies around on social media.
It is not right, and it needs to be addressed. We also need to call people out when they abuse or discriminate against any minority group.
So, I understand the motivation for the Hate Crime Bill.
But the way it is drafted puts the very principle of free speech at risk.
Ministers must pause and make the necessary changes to this legislation or withdraw it altogether.
If that does not happen, the bill may well meet the same fate as the Offensive Behaviour at Football Act. That piece of badly-drafted legislation was eventually repealed, but not before SNP ministers ignored warnings from the legal profession and opposition politicians that it was unworkable.
The same mistake must not be made again