In Windows, a file extensions are the part of a filename that comes after the last dot, for example, “.txt” or “.doc”. They serve to identify the kind of data in the file, so the OS knows what applications can open the file.
The Windows implementation of file extensions has been criticised on several counts: the mechanism has been extended and hacked several times to accommodate advances in technology, so it really is not very clean any more. However, these are implementation issues.
The real problem with the current scheme is the entanglement of the label that identifies the file and the type of information in the file.
Interestingly, in real life, the name of a thing often does indicate the type of of that thing. For example, “Marion” is likely to be female. “Ford” is likely to be a car. “Elvis” is likely to be a singer. On the other hand, this rule is not followed without exception. Is “Chris” male or female? “Marion Morrison” is male (aka. John Wayne), “Ford” is also a river crossing, “Elvis” could be the name of my cat (if I had one).
The solution is that, in principle, the name of a file and the file type should be separate attributes of the file. They should be independent part of the file’s meta-data, just like creation date, size, etc. Furthermore, the filename should be completely arbitrary.
For an example of the benefits, consider one of the most common problems with the current mechanism: some users think that if they change the file extension then they can open the file with a different application. Of course, this actually works for some files , e.g. “.log” -> “.txt” and “.config” -> “.xml”.In most cases, however, it fails. I have tried to explain to these users that expecting things to work this way is if calling me “Marion” would make me female, calling me “Ford” would make me a car manufacturer or calling me “Elvis” would give me the ability to sing (or miaow convincingly). Some users get this. Others do not. Of course, I could put this down to user stupidity. However, given that the whole issue could be avoided with better design, I prefer to think of this as the system’s stupidity.
The trouble is, it is a bit late to change things now…