The "some" keyword indicates that the function returns a specific type, even if that type isn't known to the caller.
One place where this is meaningful is if you have to use the result of that function in a generic function. For instance if my functions are defined like this:
The "some" keyword indicates that the function returns a specific type, even if that type isn't known to the caller.
One place where this is meaningful is if you have to use the result of that function in a generic function. For instance if my functions are defined like this:
And I try to call this: I will get an error, because the protocol Button does not conform to itself. However If I use opaque types: this works just fine because the compiler is able to determine the concrete type returned by `createPlayButton`