zhjwpku opened a new pull request, #40:
URL: https://github.com/apache/iceberg-cpp/pull/40

   After studied [0], [1] and [2], I'm inclined to backport [0] to iceberg-cpp, 
the main reason is that [0] has exactly the same APIs as std::expected, [1] 
provide some extra member functions like `map` and `map_error`, [2] has 
different API names like `then` and `thenOrThrow`.
   
   We want users to use iceberg::expected the same way as std::expected, and we 
will replace iceberg::expected with std::expected when we decide to move to 
c++23 some day, by backporting [0], we can facilitate a smoother transition 
process.
   
   We discussed about `Exceptions vs Expected` in #14, while backporting [0], I 
had the feeling we shouldn't choose one over the other, we can use both 
approaches effectively.
   
   expected provide monadic operations like `and_then`, `transform`, `or_else`, 
`transform_error`, let us do method chaining, which is a good sign.
   
   [0] https://github.com/zeus-cpp/expected
   [1] https://github.com/TartanLlama/expected
   [2] https://github.com/facebook/folly/blob/main/folly/Expected.h
   [3] https://en.cppreference.com/w/cpp/utility/expected


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to