That depends? My first swimming lessons were in Kindergarten when I was 4-5. We were visiting public baths "unsupervised" (they still had lifeguards of course) by the time I was 8.
Assuming the kid wasn't even planning to enter the water, I see no inherent problem here. We seem to be operating on the assumption that unsupervised children will immediately succumb to sudden and irrational urges to kill themselves in creative ways.