Comment

Comment by jakobegger

Because that does not work with generic protocols. You can't have a function return a sequence:

    func make_numbers() -> Sequence<Int> {
     // Cannot specialize non-generic type 'Sequence'
    }
    func make_numbers() -> Sequence {
     // Protocol 'Sequence' can only be used as a generic constraint because it has Self or associated type requirements
    }
Whereas with this change you probably could at some point do something like this:

    func make_numbers() -> some Sequence<.Element == Int>
parent jakobegger 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton