Swift

Combining opaque return types with primary associated types

A Swift by Sundell tutorial shows how combining opaque return types with primary associated types reduces the need for type erasure with generic protocols. It contrasts this with earlier Swift, where returning a Combine Publisher required wrapping it in AnyPublisher because the compiler lacked information about the output and error types.

AI-written summary, checked against the cited sources. How summaries work

Read at Swift by Sundell