# \[Pitch\] Last expression as return value

**URL:** <https://forums.swift.org/t/pitch-last-expression-as-return-value/76958>\
**Category:** Pitches\
**Created:** [January 2, 2025, 12:37am UTC](https://forums.swift.org/t/pitch-last-expression-as-return-value/76958 "2025-01-02T00:37:10Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![localhost](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/localhost/32/32433_2.png) [@localhost](https://forums.swift.org/u/localhost)\
**Post date:** [January 2, 2025, 5:25am UTC](https://forums.swift.org/t/pitch-last-expression-as-return-value/76958/19 "2025-01-02T05:25:09Z")

</div>

How does this interact with result builders?

e.g. this code:

```swift
var body: some View {
    Text("Foo")
    Text("Bar")
}

```

is currently interpreted something like

```swift
var body: some View {
    Group {
        Text("Foo")
        Text("Bar")
    }
}

```

However, this is also valid:

```swift
var body: some View {
    Text("Foo")
    return Text("Bar")
}

```

The latter interpretation is obviously less common, but still out in the wild, and would still require an explicit final `return`.

---

_[View the full topic](https://forums.swift.org/t/pitch-last-expression-as-return-value/76958)._
