# Variadic parameters passing

**URL:** <https://forums.swift.org/t/variadic-parameters-passing/72080>\
**Category:** Using Swift\
**Created:** [May 26, 2024, 1:34pm UTC](https://forums.swift.org/t/variadic-parameters-passing/72080 "2024-05-26T13:34:43Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Nobody1707](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nobody1707/32/2169_2.png) [@Nobody1707](https://forums.swift.org/u/Nobody1707)\
**Post date:** [May 26, 2024, 5:43pm UTC](https://forums.swift.org/t/variadic-parameters-passing/72080/5 "2024-05-26T17:43:27Z")

</div>

> [@Another attempt at passing arrays as varargs (with implementation)](https://forums.swift.org/t/another-attempt-at-passing-arrays-as-varargs-with-implementation/26718/95):
>
> The core team discussed this pitch today. We think it is solving an important problem, but doesn’t sufficiently account for future design directions, such as variadic generics, which should—when introduced—work like it’s part of the same feature. The proposed syntax is specific to homogeneous collections (so wouldn’t apply to generic argument packs) and needlessly so: the compiler doesn’t need the element type to be restated just so it can explode the array. We’re not necessarily opposed to ad…

Given this, it sounds like the syntax the core team wants for splatting is:

```swift
func foo<T>(_ arg: T...) {
    print(repeat each arg)
}

```

Which isn't that bad, and I can't think of any reason it won't work. It's basically just an overload of `repeat each` that takes an array instead of a pack parameter.

The implementation in the pitch has probably bit-rotted though.

---

_[View the full topic](https://forums.swift.org/t/variadic-parameters-passing/72080)._
