[Github-comments] [geany/geany] New filetype extensions (#1720)

elextr notifications at xxxxx
Sun Dec 17 07:46:03 UTC 2017


> This division to "languages" and "non-languages" seems artificial and harmful. Managing file types by hand is tedious and unnecessary. If a file is known to be of particular type, why not associate it with that type by default?

Yes the division is artificial, and it would be great to add everything from every application to the extensions, but its not a no-cost exercise.  Each pattern in the extensions list has to be tested against the filename when opening every file that can't have its filetype determined from contents (which is most of them).  For each individual filename pattern that is added for every application, all the users who did NOT use that application still pay the cost to check the pattern.  There are thousands (maybe slight exaggeration :) of JS frameworks and Python frameworks and other applications and so on.  I would prefer to discriminate against them ALL rather than have to pick winners to keep the costs of the extensions checks in control, and not have all users (especially me:) pay the cost for tons of stuff they don't use.

Also some notes on the ones that are possible filetypes:

TOML is not currently a Geany filetype, how well the `.conf` filetype (which is essentially Windows `.ini` format) will handle it is unknown but its probably the closest.  So expecting it to work may be disappointing.

Your JSON5 filetype specifies a json5 tag parser that does not exist in Geany.

I don't know if the lexer for JS is JS5, and there is no json5 tag parser, thats why I asked about how well JSON5 will work.  Again expecting it to work may be disappointing.

In both the cases above adding extensions that don't map to filetypes that work well is making a promise that can't be kept, and just causes user frustration and bug reports that can't be fixed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1720#issuecomment-352238039
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171216/88edad26/attachment-0001.html>


More information about the Github-comments mailing list