Tip of the week


 Tidbits: Apple Releases new OS betas, Xcode moves to clangd, Swift Tip: In-Place Map

Its random-tidbit thursday:

• Apple has released the second betas of macOS 10.13.5 and iOS 11.4, but the release notes are still extraordinarily boring. We are still waiting for a new Xcode beta with Swift 4.2.

• Apple seems to be moving Xcode from using libclang to clangd. What could this possibly mean for developers? One the one hand, Apple’s commitment to improving ‘clangd’ could mean improved ObjC&Swift support in other IDEs using clangd, like VisualStudio Code. One the other hand, if Xcode gets support for the Language Server Protocol, it could become easier to add support for other languages to Xcode.

• The objc.io Swift Tip Of The Week explains us the benefits of using mutation in general and in-place map in particular – check it out.


Tip Of The Week: Swift Local Computed Variables by objc.io

The guys over at objc.io are posting Weekly Swift Tips on a clockwork schedule – this week they explain how ‘local computed properties‘ can be used to speed-up code where variables that can be expensive to compute are not used in all branches. This seems like one of the first things any optimising compiler should take care of (doing calculations only when they are actually needed), does anyone have any hard data on whether the Swift compiler really does not figure this out on its own? How about other languages and compilers?