kevingurney opened a new issue, #36249:
URL: https://github.com/apache/arrow/issues/36249

   ### Describe the enhancement requested
   
   Per the discussion in 
https://github.com/apache/arrow/pull/36190#discussion_r1237932111, it would 
help with code conciseness and clarity if we created a macro like 
`MATLAB_ASSIGN_OR_ERROR` to mirror the design of the 
[`ARROW_ASSIGN_OR_RAISE`](https://github.com/apache/arrow/blob/320ecbd119f26cb2f8d604ed84aae2559dbc0e26/cpp/src/arrow/result.h#L475)
 macro.
   
   The naming `MATLAB_ASSIGN_OR_ERROR` roughly matches the naming of the 
[`MATLAB_ERROR_IF_NOT_OK`](https://github.com/apache/arrow/blob/e3eb5898e75a0b901724f771a7e2de069993a33c/matlab/src/cpp/arrow/matlab/error/error.h#L26)
 macro.
   
   This will make working with `arrow::Result` types in the MATLAB interface 
code much easier.
   
   **Example**:
   
   ```cpp
   MATLAB_ASSIGN_OR_ERROR(auto array, MakeArray(), error::FAILED_TO_MAKE_ARRAY);
   ```
   
   ### Component(s)
   
   MATLAB


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to