In Swift 5.5, property wrappers can now be placed on function and closure parameters. This has allowed me to write something that I and many people have always wanted in Swift — a way to somehow enforce that a closure is called exactly once.

To understand why, here’s a simple…

A lot of programming languages provide a contains/any method that is used to check whether there is at least one element in a sequence that satisfies a given predicate. For example:

It’s been a couple of months since Apple announced SwiftUI — a new framework that allows developers to build apps in Swift using declarative code and little boilerplate.

I’ve been learning a bit about SwiftUI in the last three months and experimenting with some code, however recently I had the…

Type casting is a really easy and convenient way to check the type of an instance or to convert its type to another type.

One of the operations we sometimes perform when dealing with collections is to convert it into a collection of something else. …

In the previous post, we learned about the new language features in Swift 5.1, such as opaque result types and function builders, which power the new declarative syntax of SwiftUI.

Now that we understand the basic syntax, it’s time to start exploring the basics of SwiftUI itself.

This post is…

A few days ago at WWDC ’19, Apple surprised everyone with a brand-new framework called SwiftUI, which allows developers to write apps for Apple platforms using a new declarative Swift syntax, right in Xcode.

SwiftUI is built on top of Swift* and allows developers to quickly write apps without much…

Most people are familiar with value types and reference types in Swift. For example — an enum and a struct is a value type, where as a class is a reference type.

Most people are also familiar with the differences between the two, however it’s not as simple as it…

In part 1 of the blog post, you learned about the basics of contributing to Swift — finding issues to resolve, checking out the source code, etc.

In this final part, you will learn how I resolved 5 issues & got 4 pull requests merged into the compiler and most…

If you’ve been writing Swift code for a while, then you probably know that Swift is open source and if you’re passionate about writing Swift code, then perhaps you already have some ideas on how to improve it or maybe you have identified a bug that needs to be patched.

In the first part of this series, we talked about CreateML & built a demo app using it. In this (last) part, we will talk about another ML framework by Apple, called TuriCreate and build another demo app using it.


Suyash Srijan

iOS Engineer at @theappbusiness. Swift compiler collaborator.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store