It would seem that the Surveillance (nice French word, that!) State is NOT the answer. There were 1,200 surveillance cameras in and around Nice, France. Good cameras. No one watching those cameras, apparently, because backtracking the attack vehicle shows the perp loading it with guns, etc out away from the City center. Think about it. An attentive guard can monitor MAYBE six screens showing activity at once. That would mean that the Gendarmerie needed 200 cops watching monitors on a busy night. I don't know how many they actually had, but if it was more than a dozen, I'd be surprised.
The answer here would have been to have zero road traffic permitted on the waterfront. Maybe they did, I haven't heard, but if that WAS the case, they were unprepared for a vehicle ramming the barriers.
Another answer, of course, would be to have an armed populace. If that had been a crowd on the US Gulf Coast, for example, it's likely that the vehicle would have been fired upon by many, many concealed carriers, markedly shortening the death-rampage. On Coney Island, NY? Not so much resistance. Gun-free zone.
Curious that there were apparently far more weapons on the truck than the lone perp could use. First thing that come to MY investigatory mind is: Where was the rest of the crew of Jihadis? Chickened out? Dog crossed their path and they had to go bathe and change clothes?