Apple killed the virus problem of the late 1980s dead, with only the most robust viruses surviving in the early 1990s, but none since. Apple has had an automatic updating program for at least 15 years, long before Microsoft, including monthly (if needed) security updates patching holes as they are found.
Microsoft makes a lot of money from the security holes its own products, many of which were put there deliberately as "marketing features" that later turned out to be security vulnerabilities that apparently Microsoft finds it unprofitable to close.
I've seen the source code for both Windows and OS X. Windows is very poorly engineered in general, with a great deal of cruft (leading to inadvertent security holes) while OS X is generally well engineered, benefits from being open source and pulling from open source BSD and from being fostered by a company that does not make any money from shipping security holes.
However, Apple's superior quality for the past 2 decades has resulted in a great deal of growth in profits and prominence for Apple, and this means that you can always get a lot of attention by claiming Apple has security holes. In fact, people have been making these claims for the past 15 years, in articles like this.
And yet there aren't massive botnets of Macs (the one trojan that got any traction has been eliminated) while there are millions upon millions of infected windows boxes out there to this day.
The idea that Microsoft is ahead of Apple on security is a joke to anyone who knows their history or knows their engineering.
Ok, You got me. This is obviously a troll, and I responded.... and of course the people commenting here seem to have no real knowledge of the matter, but anyone not bashing Apple is getting down voted.
This is the kind of crap that makes "Hacker" news suck.