Click to Skip Ad
Closing in...

Apple’s Swift makes it easier than ever to accidentally delete every file on your Mac

Published Jun 4th, 2014 3:05PM EDT
BGR

If you buy through a BGR link, we may earn an affiliate commission, helping support our expert product labs.

Both iOS 8 and OS X Yosemite were clearly the focus of Apple’s WWDC keynote, but one of the biggest surprise announcements was the reveal of Swift, a new programming language for developers. One of the language’s most noteworthy features, the playground, allows developers to test their code as they type, but without a “sandbox” to protect the computer, this can lead to some very unfortunate accidents.

As developer Steve Stroughton-Smith (@stroughtonsmith) warned his followers on Twitter:

You don’t even have to hit enter for the command to take effect. If you were to type that in a Swift playground, the deletion would be automatic. This is obviously a huge liability for any developers giving the brand new programming language a whirl this week, so it’s worth being extra careful if you’re one of them.

Also worth keeping in mind: don’t click any suspicious playground links you find on the web. As noted, if a dangerous line of code enters the playground, you won’t have to time to stop it. We’ll keep an eye out to see what Apple has to say about the vulnerability.

Jacob Siegal
Jacob Siegal Associate Editor

Jacob Siegal is Associate Editor at BGR, having joined the news team in 2013. He has over a decade of professional writing and editing experience, and helps to lead our technology and entertainment product launch and movie release coverage.