"The Buddha doubted the existence of an omnipotent, benevolent God. In his doctrine of 'emptiness,' he suggested that we have no real evidence for the existence of the outside world. He said that our sense of self is an illusion, too. The Buddhist sage Nagasena elaborated on this idea. The self, he said, is like a chariot. A chariot has no transcendent essence; it's just a collection of wheels and frame and handle. Similarly, the self has no transcendent essence; it's just a collection of perceptions and emotions.
"'I never can catch myself at any time without a perception.'
"That sure sounded like Buddhist philosophy to me—except, of course, that Hume couldn't have known anything about Buddhist philosophy.
"Or could he have?"
In a 2015 Atlantic article, Alison Gopnik describes her efforts in investigating a link between Buddhism and David Hume.