Well, it's been a total failure

Jonathan M Davis jmdavisProg at gmx.com
Wed Sep 15 09:27:56 PDT 2010


On Wednesday, September 15, 2010 06:08:49 Justin Johansson wrote:
> On 14/09/2010 11:07 AM, bearophile wrote:
> > Andrei Alexandrescu:
> >> I didn't know there is an executable attribute on Windows.
> > 
> > If you rename a txt file as .exe, if you click on it Windows tries to run
> > it.
> > 
> >> This reminds me of the discussion of yesteryear - people
> >> were complaining about C++ files in dmd having the .c extension, and the
> >> right answer would have been to change the blessed thing to be like
> >> everybody else has it, instead of finding arguments on why it worked the
> >> way it was.
> > 
> > +1, despite there is more than one way to give suffix to C++ files.
> > There is a bug report on this, not written by me.
> > Having source code simple, clean, tidy, and readable is important for all
> > open source projects, because that increases the probability of finding
> > collaborators. Giving a sensible suffix to files is a starting point for
> > that.
> > 
> > Bye,
> > bearophile
> 
> There is not a lot of use in creating your own "readable" file suffices
> (alla file extensions).  Unless your file extension is known on the
> platform you are using then there may be no hope of reasonable opening
> your file with the requisite application on another platform.
> 
> Say if your name was Robin, would you name your text files as .bat ?
> 
> Holy Gotham (says Batman), am I to know what application to open that with?
> 
> Cheers,
> Justin Johansson

If you're on a non-Windows system, the mime-type becomes far more important than 
the extension. Most programs in Linux (and I believe MacOS X as well) don't care 
about the extension. They just look at the mime type. Extensions become almost 
entirely a thing for the user. So, whether your file is useable becomes more of 
an issue of known mime type than known extension. Still, you don't generally 
want to just be making up extensions.

- Jonathan M davis


More information about the Digitalmars-d mailing list