Topics

Featured in Development

Alex Bradbury gives an overview of the status and development of RISC-V as it relates to modern operating systems, highlighting major research strands, controversies, and opportunities to get involved.

Featured in Architecture & Design

Will Jones talks about how Habito, the leading digital mortgage broker, benefited from using Haskell, some of the wins and trade-offs that have brought it to where it is today and where it's going next. He also talks about why functional programming is beneficial for large projects, and how it helps especially with migrating the data store.

Featured in AI, ML & Data Engineering

Katharine Jarmul discusses research related to fair-and-private ML algorithms and privacy-preserving models, showing that caring about privacy can help ensure a better model overall and support ethics.

Featured in Culture & Methods

This personal experience report shows that political in-house games and bad corporate culture are not only annoying and a waste of time, but also harm a lot of initiatives for improvement. Whenever we become aware of the blame game, we should address it! DevOps wants to deliver high quality. The willingness to make things better - products, processes, collaboration, and more - is vital.

Featured in DevOps

Service mesh architectures enable a control and observability loop. At the moment, service mesh implementations vary in regard to API and technology, and this shows no signs of slowing down. Building on top of volatile APIs can be hazardous. Here we suggest to use a simplified, workflow-friendly API to shield organization platform code from specific service-mesh implementation details.

Swift Turns 1.0: The Evolution of a Language

Apple has announced that Swift 1.0 has reached GM status on iOS and developers can now start submitting apps that use Swift. The language will continue to "advance with new features, improved performance, and refined syntax", say Apple, as it has done since its announcement at WWDC 2014 last June.

Before reaching GM status for iOS, indeed, Swift has gone through a number of beta releases that, besides fixing the inevitable bugs, have progressively refined the language syntax and semantics, and improved performance.

Swift Syntax and Semantics

With each new beta release, Apple updated its official Swift Language Reference to keep it in sync with the language new features. Xcode release notes, on the other hand, have hosted all the details about what changed in Swift from one beta version to the next, although mixed-in with the full set of Xcode changes.

This is where SwiftInFlux, a GitHub repository created by Karol S. Mazur, can come in handy and provide a glimpse of all the changes made to Swift in a structured way. What makes this repo particularly interesting is that for several of the changes made to Swift, we can read Swift creator Chris Lattner's opinion on what they meant and why they were added.

Besides listing in a concise way all the changes that each Xcode beta version brought to Swift, the repo also collects some change requests that have been discussed either in Apple developers forums, or reported to Apple through Radar. A few highlights of areas where Swift might see further development beyond 1.0 are: abstract methods, access control, C++ support, nil returning initializers, and others, though there is not any commitment on Apple part, yet.

Swift Performance

When Swift was announced, Apple touted its speed as one of its most remarkable features, with a 40% performance increase over Objective-C. Still, initial tests done by several developers showed a rather different picture, with Swift being outperformed by Python in several tests unless using the -Ofast compiler optimization option, which also removed all runtime safety checks. This finding sparked online discussions where several developers hinted at the work in progress nature of Swift and remarked that it was not so uncommon for a beta release to show performance issues.

Indeed, all of Swift performance issues were fixed as early as the beginning of last month with the release of Xcode 6 beta 5. As developer Jesse Squires reported, in Xcode 6 beta 5 Swift for the first time outperformed Objective-C in all the algorithms he had been testing since Swift was first made available. Even better results could be achieved by enabling a new -Ounchecked optimization option, which replaced -Ofast and made more explicit its real behaviour, putting Swift performance on a par with C's, albeit doing away with any optimizations, as already mentioned.

Mike Ash wrote a very detailed analysis of the reasons why Swift can outperform Objective-C, taking into account faster method dispatching thanks to static dispatching, more opportunity supported by the language for inlining function calls, more efficient register usage thanks to not having to handle the _cmd implicit parameter to any method call, and pointer aliasing, which could allow to optimize cases where more pointers refer to the same memory area.

Swift for OS X

Swift has not reached GM status for OS X, yet, due to the dependency with Yosemite SDK. Apple say that when Yosemite will reach GM, Swift will also be GM on the Mac. Meanwhile, developers can build Mac apps with Swift by downloading the beta of Xcode 6.1. Xcode 6.1 will already include a few improvements to Swift by the time Yosemite reaches GM, say Apple in the Swift announcement. No compatibility issues are foreseen, though, since "apps today embed a version of the Swift GM runtime and they will continue to run well into the future" in spite of any changes to the language definition.