-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename times
to repeat
.
#119
Conversation
@@ -279,6 +288,18 @@ extension SignalProducerProtocol { | |||
|
|||
@available(*, unavailable, message:"This SignalProducer may emit errors which must be handled explicitly, or observed using `startWithResult(_:)`.") | |||
public func startWithNext(_ next: (Value) -> Void) -> Disposable { fatalError() } | |||
|
|||
@available(*, unavailable, renamed:"repeat(_:)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree repeat
is better.
@@ -207,6 +207,15 @@ extension SignalProtocol { | |||
|
|||
@available(*, unavailable, message: "This Signal may emit errors which must be handled explicitly, or observed using `observeResult(_:)`") | |||
public func observeNext(_ next: (Value) -> Void) -> Disposable? { fatalError() } | |||
|
|||
@available(*, unavailable, renamed:"catch(_:)") | |||
public func flatMapError<F>(_ handler: @escaping (Error) -> SignalProducer<Value, F>) -> Signal<Value, F> { fatalError() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flatMapError
is far more descriptive. catch
is a well known word but it doesn't carry the extra information that this does, which draws a parallel with flatMap
.
public func attempt(_ operation: @escaping (Value) -> Result<(), Error>) -> Signal<Value, Error> { fatalError() } | ||
|
||
@available(*, unavailable, renamed:"tryMap(_:)") | ||
public func attemptMap<U>(_ operation: @escaping (Value) -> Result<U, Error>) -> Signal<U, Error> { fatalError() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These names are meant to match the Result
counterparts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer repeat
, but I think the others are better.
catch
, try
and repeat
.times
to repeat
.
@@ -1,5 +1,5 @@ | |||
import Foundation | |||
import enum Result.NoError | |||
import Result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be reverted too?
Related issue: #118