# Swift Result Builders: Creating Custom DSLs for Binary Formatted Data

DevFeed: [Swift Result Builders: Creating Custom DSLs for Binary Formatted Data](<https://devfeed.tech/articles/swift-result-builders-creating-custom-dsls-for-binary-formatted-data-23995.md>)

Original publisher: [Read original article](<https://quickbirdstudios.com/blog/swift-resultbuilder-data/>)

Author: Paul Kraft

Published: 2023-08-03T14:22:38Z

Content type: article

Language: en

Sources: [QuickBird Studios Blog](<https://devfeed.tech/sources/quickbird-studios-blog.md>)

Topics: [Declarative programming](<https://devfeed.tech/topics/declarative-programming.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [SwiftUI](<https://devfeed.tech/topics/swiftui.md>), [Bluetooth](<https://devfeed.tech/topics/bluetooth.md>)

Tags: [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [builder](<https://devfeed.tech/tags/builder.md>), [data](<https://devfeed.tech/tags/data.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [dsls](<https://devfeed.tech/tags/dsls.md>), [ios](<https://devfeed.tech/tags/ios.md>), [networking](<https://devfeed.tech/tags/networking.md>), [post](<https://devfeed.tech/tags/post.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swiftui](<https://devfeed.tech/tags/swiftui.md>)

## AI overview

The excerpt introduces using Swift result builders to describe binary message formats declaratively, so code can handle encoding rather than requiring developers to prescribe each step. It frames this as applying a style familiar from SwiftUI to binary data used in Bluetooth, internet communication, or peer-to-peer networking. The authors say they developed DataKit, a Swift library for declaratively specifying message formats and encoding and decoding binary data. The excerpt ends during its introduction to programming paradigms, so it does not show the builder implementation or its tradeoffs.

## Source excerpt

SwiftUI has revolutionized how we build UI, introducing a more intuitive, declarative approach. Instead of prescribing a series of steps to reach an end goal, we describe the outcome and let the program determine the path The post Swift Result Builders: Creating Custom DSLs for Binary Formatted Data appeared first on QuickBird Studios.