[Development] Make Qt6 JNI API safer to use

Thiago Macieira thiago.macieira at intel.com
Thu Mar 5 16:21:11 CET 2020


On Thursday, 5 March 2020 07:14:44 PST Vitaly Fanaskov wrote:
> I think something like std::expected is a nice thing to have.
> 
> There is some experimental implementation of std::expected: 
> https://github.com/TartanLlama/expected.
> 
> Another good example is Result 
> (https://doc.rust-lang.org/std/result/index.html) type from Rust. But 
> might look clumsy in C++, because there is neither pattern matching nor 
> operator? 
> (https://doc.rust-lang.org/std/result/index.html#the-question-mark-operator-> )  to handle this case gracefully.

We have QSystemResult in QtCore already. This predates both std::expected and 
Result from Rust.

One of my abandoned commits (see the I/O thread) was an update to it to make 
it better.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list