News for hackers. Stuff that matters.
Re:Wc in D: 712 Characters Without a Single Branch by VHRanger on Tuesday January 28, 2020 @01:46PM (#22172679)
How will that work with c compatibility?
Re:Wc in D: 712 Characters Without a Single Branch by WalterBright on Tuesday January 28, 2020 @01:59PM (#22172845)
That'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.

Re:Wc in D: 712 Characters Without a Single Branch by MaxBarraclough on Thursday January 30, 2020 @02:30AM (#22189600)
What's O/B?

Google took me right back to your comment.

Re:Wc in D: 712 Characters Without a Single Branch by biotronic on Thursday January 30, 2020 @02:36AM (#22189627)
Walter 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.
Re:Wc in D: 712 Characters Without a Single Branch by MaxBarraclough on Thursday January 30, 2020 @02:45PM (#22194710)
Got it, thanks.