Published in BBC on October 29
He said France would not surrender its core values after visiting the Notre-Dame basilica in the southern city. An extra 4,000 troops are being deployed to protect churches and schools.
In Nice, one elderly victim was "virtually beheaded", officials said. Another woman and a man also died.
A male suspect was shot and detained.
Anti-terror prosecutors have opened an investigation into the attack and France has raised its national security alert to its highest level.
French anti-terrorist prosecutor Jean-François Ricard later said the attacker was seriously wounded by police.
Mr Ricard said the suspect was a 21-year-old Tunisian national who had arrived in France earlier this month. He had a document issued by the Italian Red Cross.
Police sources earlier named the attacker as Brahim Aioussaoi. They said he had travelled by boat from Tunisia to the Italian island of Lampedusa in September. He was placed in coronavirus quarantine there before being released and told to leave Italy.
Nice Mayor Christian Estrosi said the suspect had "repeated endlessly 'Allahu Akbar' (God is greatest)".
Speaking after visiting Nice, President Macron said: "If we are attacked once again it is for the values which are ours: freedom, for the possibility on our soil to believe freely and not to give in to any spirit of terror. "I say it with great clarity once again today: we won't surrender anything."
The president said the number of soldiers being deployed to protect public places across the country would rise from 3,000 to 7,000.
Mr Estrosi compared the attack to the recent murder of teacher Samuel Paty, who was beheaded close to his school outside Paris earlier this month.
Police have not suggested a motive for the attack in Nice. However, it follows days of protests in some Muslim-majority countries triggered by President Macron's defence of the publication of cartoons that depicted the Prophet Mohammed. There have been calls in some countries for a boycott of French goods.
All three were attacked inside the basilica on Thursday morning before the first Mass of the day.
Two died inside the church: a 60-year-old woman who was "virtually beheaded", and a 55-year-old man whose throat was cut.
The male victim was a lay member of staff responsible for the upkeep of the church. He reportedly had a wife and two children.
Another woman, aged 44, managed to flee to a nearby cafe after being stabbed several times, but died later.
It later emerged that a witness had managed to raise the alarm with a special protection system set up by the city.
Chloe, a witness who lives near the church, told the BBC: "We heard many people shouting in the street. We saw from the window that there were many, many policemen coming, and gunshots, many gunshots."
Tom Vannier, a journalism student who arrived at the scene just after the attack, told the BBC that people were crying on the street.
Four police officers arrived at the scene at 08:57 local time (07:57 GMT) and the attacker was shot and detained shortly afterwards, the French anti-terrorist prosecutor said.
Four years ago Nice was the scene of terrorist attack, when a Tunisian drove a truck into crowds celebrating Bastille Day on 14 July, killing 86 people.
A minute's silence was held in the National Assembly.
The French Council of the Muslim Faith condemned the attack and spoke of its solidarity with the victims and their families.
Turkey, which has seen ties with France sour in recent days over remarks by Mr Macron, strongly condemned the "savage" attack.
Vatican spokesman Matteo Bruni said the killings had "brought death to a place of love and consolation".
Thursday's attack has echoes of another attack earlier this month near a school north-west of Paris. Samuel Paty, who was a teacher in Conflans-Sainte-Honorine, was beheaded days after showing controversial cartoons of the Prophet Muhammad to some of his pupils.
The murder has heightened tensions in France and the government's attempt to crack down on what Mr Macron described as "Islamist separatism" has angered Turkey and other countries.
Turkish President Recep Tayyip Erdogan was among those calling for a boycott of French goods.
The situation worsened after a cartoon on Mr Erdogan appeared in the satirical magazine Charlie Hebdo.