# \#code-style

**URL:** https://forums.swift.org/tag/code-style/581.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Where to order #isolation and #\_sourceLocation arguments](https://forums.swift.org/t/where-to-order-isolation-and-sourcelocation-arguments/74070)

<div class="topic-metadata">

**Author:** [@macguru](https://forums.swift.org/u/macguru)\
**Replies:** 14\
**Last updated:** [August 22, 2024, 10:09am UTC](https://forums.swift.org/t/where-to-order-isolation-and-sourcelocation-arguments/74070 "2024-08-22T10:09:24Z")

</div>

I have a test function implemented, basically an extension to Swift Testing's await confirmation {…} function. In order to get good error messages on the call site, I pass a SourceLocation to test assertions inside. In o…

---

## [I'm declaring a protocol that inherits multiple protocols. What's the best style suggestion for open curly brace and linewrapping the parents?](https://forums.swift.org/t/im-declaring-a-protocol-that-inherits-multiple-protocols-whats-the-best-style-suggestion-for-open-curly-brace-and-linewrapping-the-parents/66446)

<div class="topic-metadata">

**Author:** [@lisanvo](https://forums.swift.org/u/lisanvo)\
**Replies:** 4\
**Last updated:** [August 1, 2023, 5:38pm UTC](https://forums.swift.org/t/im-declaring-a-protocol-that-inherits-multiple-protocols-whats-the-best-style-suggestion-for-open-curly-brace-and-linewrapping-the-parents/66446 "2023-08-01T17:38:11Z")

</div>

Hi there, I'm implementing a protocol that has multiple parents, and I'm unsure of the most preferred way to line-wrap the parents, and where to put the open curly brace. I want the protocol style to stay consistent with…

---

## [How to structure swift code](https://forums.swift.org/t/how-to-structure-swift-code/52570)

<div class="topic-metadata">

**Author:** [@jacubit](https://forums.swift.org/u/jacubit)\
**Replies:** 2\
**Last updated:** [October 3, 2021, 7:08pm UTC](https://forums.swift.org/t/how-to-structure-swift-code/52570 "2021-10-03T19:08:17Z")

</div>

Coming from C++, I have not yet understood two important things in Swift: How do you structure the code in swift without headers in large projects without loosing track of the main interfaces or putting implementation…
