[erlang-questions] Generally agreed file extension...

zxq9 zxq9@REDACTED
Sun Sep 3 06:18:43 CEST 2017


On 2017年09月02日 土曜日 08:28:28 you wrote:
> On 09/02, zxq9 wrote:
> >We have .erl, .hrl, .beam, .ez and .app file extensions in common use.
> >
> >Is there any generally agreed upon file extension for files that contain data formatted for use by file:consult/2?
> >
> 
> I've used filename.consult quite a few times. Otherwise, the .config 
> format for Erlang is close to that. In the most cases though, people 
> appear to use extensions that explain what the file contains and not its 
> format, oddly enough.
> 
> sys.config uses the format, although it asks for a full list of terms:
> 
>     [{App1, CfgList1,
>      {App2, CfgList2,
>      ...
>      {AppN, CfgListN}].
> 
> the .app (and .app.src) files use the consult format as well, and so do 
> various ones like rebar.config, rebar.lock, relx.config, elvis.config, 
> common_test's .spec files, etc.

In the past I've also often used the extension to name what type of thing
it is instead of the format. Was wondering if there was a standardish way
but its not a big deal.

Some interesting suggestions were Mikael Pettersson's suggestion of using
.eterm as universal extension and in #erlang illo suggested following the
convention of .erl and .hrl files would yield .trl

Any preference among folks on the ML? (Other than the useful tradition of
using the extension as a label of what the file is instead of the format)

-Craig



More information about the erlang-questions mailing list