Posting as an example of capsicumizing a trivial application that has little attack surface. As demonstrated with elfdump in D7944 some implementation-specific rights are required by stdio.
For applications like primes (and elfdump) the I think benefit in the simplicity of just entering capability mode (and dropping ambient authority) outweighs the few additional lines of code and possible maintainability cost of manipulating stdio rights.