theoriginalbit / SwiftResultBuilders

A project to demonstrate how correct usage of Result Builders can lead to cleaner and easier to maintain code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift Result Builders

This is a project to demonstrate how correct usage of Result Builders can lead to cleaner and easier to maintain code.

The below image shows where the code started with very common patterns of intermediate arrays to achieve conditional sections (left) and how the code now looks with the addition of a result builder (right).

In both of the above scenarios the app looks like this:

A screenshot of the apps settings screen. A typical settings screen showing multiple sections with either one or more items in each section

About

A project to demonstrate how correct usage of Result Builders can lead to cleaner and easier to maintain code.


Languages

Language:Swift 100.0%