3 ms·
How will that work with c compatibility?
by VHRanger 7y ago
How will that work with c compatibility?
- WalterBright 7y agoThat's a very good question! When connecting with C code, the C functions being called will need to conform to O/B principles as far as the interface to the function is concerned. It's the same issue as calling unsafe code - the compiler can't check it, the programmer has to. But if you use D as a BetterC compiler, then the D compiler can check the O/B rules in the code. Functions that are O/B checked are marked with the `@live` attribute, meaning that you'll be able to incrementally use O/B in the code. This is much like how you can use the `pure` attribute to incrementally write functionally pure code.
- MaxBarraclough 7y agoWhat's O/B? Google took me right back to your comment.
- biotronic 7y agoWalter got a bit confused here - what he's describing is the owner/borrow system he's proposed to compete with Rust. This is unrelated to named parameters.
- MaxBarraclough 7y agoGot it, thanks.