To be honest I think the statement should be "anyone can learn to program". To be a great programmer requires many things to align, and mental disorders count as well. A combination of mild autism and mild depression (melancholy?), social isolation and environment in general I think is necessary, but tip the balance in either direction and things start to get real shitty real quick.