On 2011-09-06 19:39, Steven Schveighoffer wrote:
I like enums in terms of writing code that processes them, but in terms
of calling functions with them, I mean look at a sample fstream
constructor in C++:
fstream ifs("filename.txt", ios_base::in | ios_base::out);
vs.
File("filename.txt", "r+"); // or "rw"
There's just no way you can think "rw" is less descriptive or
understandable than ios_base::in | ios_base::out.
-Steve
But "r+" is. And that's what I assume will be used when I see a file
opening function taking a string "mode" parameter. But if you say that
"rw" can/will be used instead than that's better.
--
/Jacob Carlborg