-
Notifications
You must be signed in to change notification settings - Fork 654
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
collection of renames for 2.0 #663
Comments
|
again, CC'ing some folks @helje5 / @tanner0101 / @ianpartridge / @pushkarnk / @MrMage / @tachyonics / @airspeedswift / @moiseev / @kjessup / @normanmaurer / @Lukasa / @Joannis . Please name your small pet peeves here :) |
What’s the motivation for changing port numbers to |
it's Swift convention to always use |
Makes sense, thanks!
… On 27. Nov 2018, at 12:11, Johannes Weiss ***@***.***> wrote:
rename ctx to context
What’s the motivation for changing port numbers to Int? Aren’t they always unsigned 16-bit integers?
it's Swift convention to always use Int for everything (at least in public API) because it makes interoperability work much better. See for example Array's var count: Int even though clearly it's never negative...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Do you want to tackle #602 in 2.0 too? |
@ianpartridge absolutely! thanks for reminding me |
to match |
|
What does |
Sorry, the comment should just say "add methods". Mostly I just think it would be nice to have the option to specify name / after / before when adding multiple handlers. For name, something like |
strong -1 to any name that starts with
, the important part here is that you can only transform a success to a success and nothing else.
Namely, there's a natural translation from
to
which is exactly the right input type for a
to
which would be the right input type for a public func flatMapThrowing<NewValue>(file: StaticString = #file,
line: UInt = #line,
_ callback: @escaping (Value) throws -> NewValue) -> EventLoopFuture<NewValue> {
return self.flatMap(file: file, line: line) { (value: Value) -> EventLoopFuture<NewValue> in
do {
return EventLoopFuture<NewValue>(eventLoop: self.eventLoop, result: try callback(value), file: file, line: line)
} catch {
return EventLoopFuture<NewValue>(eventLoop: self.eventLoop, error: error, file: file, line: line)
}
}
} but I realise that people don't like it so I'd be open to
-1 to this one too. Overloads always lead to sadness and this one saves two characters (#776 is the PR to get rid of the labels for
+1 |
closing because mostly done apart from the work already filed as #483 |
This is supposed to become a crowd-sourced random collection of renames in SwiftNIO for the 2.0 release. Please just add something like
FooBar(bar: Bar)
toFooBar(_ bar: Bar)
The text was updated successfully, but these errors were encountered: