As nice a language as Swift is, there are still some gotcha's that can catch even an experienced programmer by surprise. This page contains links to posts that exemplify such gotcha's.
How
process(inbuf: &inoutbuf, outbuf: &inoutbuf) can have some nasty side effects.
The difference between UnsafePointer and UnsafeMutablePointer. Or when using the same syntax can lead to very different results.
Turns out, inout arguments and observers don't mix well.
Not all empty array slices are created equally, [1 ... 0] is not the same as [1 ..< 1]
The time of creation of a String.Index instance determines its usable range...
How a linked list using 'while let' can get you into trouble.
The fix-it solution for weak unwrapped bools can create runtime crashes
Be careful with the scope a defer statement is in.
Prevent non-reproducible runtime crashes: never 'force-unwrap' a weak reference.
No comments:
Post a Comment