Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Edward Bromley
3,353 PointsDeprecation of ++ and --
It appears that Apple plans to remove these operators. https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md
Should the video reflect this?
1 Answer

Michael Hulet
47,842 PointsThe ++
and --
operators are deprecated in the latest version of Swift, and will be removed entirely in Swift 3.0, coming this Fall (assuming you live in the Northern Hemisphere. Otherwise, Spring). That being said, Swift is still a rapidly evolving language, and will continue to be as such for a long time, though a lot of stuff should be finalized with Swift 3, because that update will come with ABI stabilization. Because of that, my personal vote is towards adding teachers notes right now, and then recording new videos with Swift 3

Nathan Wong
7,129 PointsNow that Swift 2.2 has been released, it would probably be good for the teacher's notes to be updated. It would be nice if the associated task were updated to support the alternative syntax as well.

Laura Ross
Courses Plus Student 2,449 PointsI agree with Nathan. I can't figure out how += 1 is replacing ++. The auto-fixes suggested by the compiler are
x = ++b is now x = b += 1
and
x = b++ is now x = b += 1
Can someone explain the correct replacement?

Michael Hulet
47,842 PointsI wrote a far more detailed answer over here
Sebastian Nitu
8,616 PointsSebastian Nitu
8,616 PointsYes, that is correct. Starting with Swift 2.2, the postfix operators ++ and -- will be depricated.
You can learn more about the upcoming Swift changes here: http://ericasadun.com/2015/12/03/changing-swift-whats-coming-up-in-2-2-and-3-0/