> On March 3, 2014, 8:41 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/include/process/future.hpp, lines 92-93
> > <https://reviews.apache.org/r/18443/diff/1/?file=502836#file502836line92>
> >
> > Why? We intentionally added Failure as syntactic sugar. :)
>
> Dominic Hamon wrote:
> multiple ways to do the same thing belie a poor API. There should be one
> way to create a failure.
>
> As it says "Consider..." :)
>
We created the helper to simplify code dealing with failures, this was the case
for Error (error.hpp) as well:
Future<string> foo()
{
return Failure("Not implemented"); // No <> templating needed.
}
vs.
Future<string> foo()
{
return Future<string>::failure("Not implemented");
}
So if anything, we should consider deprecating the factory method instead. Feel
free to move the TODO there instead if you want to keep it!
- Ben
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18443/#review36025
-----------------------------------------------------------
On March 3, 2014, 9:23 p.m., Dominic Hamon wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18443/
> -----------------------------------------------------------
>
> (Updated March 3, 2014, 9:23 p.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-1008
> https://issues.apache.org/jira/browse/MESOS-1008
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> See summary
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/future.hpp
> e45f4f79faeefbffc28d855d2f74e8df69099f18
> 3rdparty/libprocess/src/tests/http_tests.cpp
> 779c30b235506453a68f7a089dd4438e540fce5a
>
> Diff: https://reviews.apache.org/r/18443/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Dominic Hamon
>
>