# Reverse generics for argument type?

**URL:** <https://forums.swift.org/t/reverse-generics-for-argument-type/47842>\
**Category:** Discussion\
**Created:** [May 2, 2021, 10:41am UTC](https://forums.swift.org/t/reverse-generics-for-argument-type/47842 "2021-05-02T10:41:05Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![sighoya](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sighoya](https://forums.swift.org/u/sighoya)\
**Post date:** [May 2, 2021, 4:18pm UTC](https://forums.swift.org/t/reverse-generics-for-argument-type/47842/20 "2021-05-02T16:18:19Z")

</div>

> [@SE-0309: Unlock existential types for all protocols](https://forums.swift.org/t/se-0309-unlock-existential-types-for-all-protocols/47515/118):
>
> By that definition, `some P` isn't existential. `some P` is shorthand, with the added benefit of hiding the real type from the caller. But that's all a compiler trick. `some P` is a stand-in from the perspective of the _developer_ , never the compiler.
> 
> `some P` behaves like the following:
> 
> ```swift
> // magic modifier to hide the real type from everyone else.
> private(type) typealias HiddenP = Int
> 
> public func f() -> HiddenP {}
> 
> ```
> 
> One would not consider `HiddenP` to be an existential, and `some P` is nothing more than Swift's actual implementation of my made-up `typealias` modifier.

I give you right, here. We can actually consider `some P` in return type position as type aliases, but for the argument position, it seems not to working anymore.  
The type aliases are created from other callees than the actual callee accepting the `some P` type, so we actually have to deal with different type aliases.

---

_[View the full topic](https://forums.swift.org/t/reverse-generics-for-argument-type/47842)._
