On 2/5/15 3:22 PM, Dicebot wrote:
To put it differently - there is no way I would have ever taken the risk merging a 50-line @trusted function, be it Phobos or work project.
Surely you're exaggerating. We're looking at a function that performs system calls and reads into a memory buffer allocated appropriately (and economically). Claiming that that function is safe then enumerating the numerous unsafe and unprovable escape hatches it uses is someone claiming "I'm a virgin - of course save for those six one-night stands I've had."
It's unclear what you're advocating here. I don't think your previous arguments stand scrutiny. One possible new argument might be an analysis on how this:
https://github.com/D-Programming-Language/phobos/blob/accb351b96bb04a6890bb7df018749337e55eccc/std/file.d#L194 is easier to reason about than this: https://github.com/D-Programming-Language/phobos/blob/master/std/file.d#L194 Andrei
