![]() ![]() * Error log files tend to be created empty, to be filled if and only if an error happens. Further complications arise if some other users created a file with that name in the mean time. Text editors that regularly make a backup would need special-case code to deal with the situation that the user might delete the last line, go to lunch, then come back and add another line.More practically, deleting the last line of a text file would need to be special-cased.The same operation on a file that consisted of just "AAAAAAAAAAAAAAAAAAAA" would have to deal with the special case of a vanishing file. If a file contains 20 letters "A", and you remove all "A"s, then the file will become 20 bytes shorter.Longer answer: It's defined that way because some operations are conceptually simpler: Simple answer: Because it's defined that way. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |