Swift Tips

This is just a link to an article on Swift that I found useful. “guard” is a new Swift thingy that replaces a design pattern I have been using already. The more I use Swift, the more i like it!

Using Guard Properly

Oh, one more little thing I learned today. The C method of writing for-loops is going away, so you should start writing them in the new Swift way:

for x in 0..n { … }

(works if you never write to x, which normally you don’t)

Carry on!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s