3 ms·
> (borrowed from MS COM) are you referring to microsoft's com (component object model)?
by abiox 9y ago
> (borrowed from MS COM)
are you referring to microsoft's com (component object model)?
- tmzt 9y agoYes, though more to HRESULTS from the Windows API. This meant return values could indicate success or a specific error which could be determined with macros. Rust actually has a similar mechanism in its standard lib, the Result enum whuch resembles Maybe from Haskell, but has either a returned value if successful (which can be the empty object ()) or an Error. XPCOM was modeled on the Microsoft version using the same vtable tricks that it used to enable dynamic dispatch through interfaces.
- steveklabnik 9y agoSmall note, Option in Rust is Maybe in Haskell, Result in Rust is Either in Haskell.